1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
abruzzese [7]
2 years ago
10

In this problem, we want to represent the relationship between the input of a system, x, and its output, y, using a polynomial.

A set of 21 system measurement data pairs were obtained and saved in the MATLAB file xyg1.mat.
To solve this problem, design and write a MATLAB function named polyfitsystem.m that has the following requirements:

1. The function must have the following input arguments:

a. x containing the input measurement data
b. y containing the output measurement data
c. R2 the minimum desired coefficient of determination resulting from the curve fitting calculations

2. The function must have the following output arguments:

a. z containing the coefficients of the fitting polynomial
b. N the degree of the polynomial
c. R2 the actual coefficient of determination resulting from the curve fitting calculations.

You may use the MATLAB built-in functions polyfit and polyval inside your user-defined function polyfitsystem.

To test your function, write a MATLAB script that calls your polyfitsystem function using the provided data and the following examples of minimum desired values for R2
Physics
1 answer:
alexandr402 [8]2 years ago
5 0

Answer:

clc

clear all

close all

format long

A=load('xyg1.mat');

x=A(:,1);

y=A(:,2);

[z,N,R2]=polyfitsystem(x,y,0.95)

function [z,N,R2]=polyfitsystem(x,y,R2)

for N=1:20

z=polyfit(x,y,N);

SSR=sum((y-polyval(z,x)).^2);

SST=sum((y-mean(y)).^2);

s=1-SSR/SST;

if(s>=R2)

R2=s;

break;

end

end

xx=linspace(min(x),max(x));

plot(x,y,'o',xx,polyval(z,x));

xlabel('x');

ylabel('y(x)');

title('Plot of y vs x');

end

Explanation:

You might be interested in
Which describes Einstein’s idea of space and time?
Sholpan [36]
Time and space are both relative
8 0
3 years ago
Read 2 more answers
a 2-kg object is dropped from a height of 1000 m. What is the force of air resistance on the object when it reaches terminal vel
strojnjashka [21]
It stops accelerating when the air resistance is equal to its weight.
That's (m•g)

= (2 kg) • (9.8 m/s^2)

= 19.6 newtons
5 0
3 years ago
Which letter represents the position of maximum potential energy of the pendulum
worty [1.4K]
If you mean the SI Unit of GPE, the answer is J for Joules.
if that's not the question being asked, i would need a little more elaboration please :)
4 0
3 years ago
Answer this question ASAP please and thank you
allochka39001 [22]
The answer is Oscar Robertson and Jerry West !! hope this helps :p
8 0
3 years ago
Read 2 more answers
Which is an important step in how an electric motor uses magnetic force to produce motion?
Fiesta28 [93]

Answer:B.As the north pole of the electromagnet nears the south pole of the permanent magnet, the current reverses and the poles of the magnets then repel.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • In what direction does an object move when affected by an unbalanced force
    9·1 answer
  • What energy powers the star throughout its life?
    14·1 answer
  • An agent has just listed a power plant. This is an example of what type of real estate?
    7·1 answer
  • How much heat in joules is required to melt an ice cube with a mass of 18.6 g at 0 °C? The Lf for water is 333 J/g.
    11·1 answer
  • How do you calculate the coefficient of friction?​
    9·1 answer
  • It is important to wear protective equipment in both practice and games.
    10·1 answer
  • In this experiment, you will use a track and a toy car to explore the concept of movement. You will measure the time it takes th
    6·2 answers
  • What part of a plant cell traps sunlight?_____________________
    14·2 answers
  • A bus driver heads south with a steady speed of
    13·1 answer
  • What is the total moved without regard to direction​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!