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]
3 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]3 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
A diver is on a board 1.80 m above
Virty [35]

Answer:

v = 6.95 m/s

Explanation:

Given that,

A diver is on a board 1.80 m above  the water, s = 1.8 m

The initial speed of the diver, u = 3.62 m/s

Let v is the speed with which she hit the water. It will move under the action of gravity. Using the equation of motion as follows :

v^2-u^2=2gs\\\\v=\sqrt{u^2+2gs} \\\\v=\sqrt{(3.62)^2+2(9.8)(1.8)} \\\\v=6.95\ m/s

So, she will hit the water with a speed of 6.95 m/s.

8 0
3 years ago
Read 2 more answers
Where does body heat come from?
ruslelena [56]

Friction produces heat

8 0
2 years ago
Read 2 more answers
5 points
olga2289 [7]

Answer:

d. 5 ohms

Explanation:

For resistors in parallel, the equivalent resistance is found with:

1/Req = ∑(1/R)

1/R = 1/15 + 1/15 + 1/15

1/R = 3/15

R = 15/3

R = 5

8 0
3 years ago
PS Final Exam
tatuchka [14]

Answer:

rolling friction

Explanation:

5 0
3 years ago
If a space probe sends back info on an object traveling through space at close to the speed of light astronomers will be working
OleMash [197]
The speed of light in a vacuum is 300,000,000 m/s
That is three hundred million meters per second.
Therefore, the answer is
C) millions of meters per second
8 0
3 years ago
Other questions:
  • A bullet with a mass of 5 gramsand speed of 560 m/sis fired horizontally atablock of wood with a mass of 2 kg. The block rests o
    10·1 answer
  • How is pressure related to force and surface area
    5·1 answer
  • A train travelling at a speed of 108km/h.how much distance is it traveling every second ?
    6·1 answer
  • An electron with a charge of -1.6 × 10-19 coulombs experiences a field of 1.4 × 105 newtons/coulomb. What is the magnitude of th
    12·2 answers
  • What beat frequencies result if a piano hammer hits three strings that emit frequencies of 392.0, 587.3, and 146.8 hz? (enter yo
    7·1 answer
  • Can someone help me its A,B,C,D
    5·1 answer
  • Gold has a density of 19300 kg/m³. Calculate the mass of 0.02 m³ of gold in kilograms.
    10·2 answers
  • Suppose Galileo dropped a lead ball (100 kilograms) and a glass ball (1 kilogram) from the Leaning Tower of Pisa. Which one hit
    8·1 answer
  • Please help due is 1 hour please its very urgent :(((
    13·1 answer
  • 2 H2O2-> 2H20+02
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!