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
If themass is 50kg, what weight of water is to be displaced to float on water? why
ludmilkaskok [199]

Answer:if youre looking for the weight of the thermas in genral it should be 500n

Explanation:using the formula w=mg

w=500x10

giving us 500 newtons which is the weight.

5 0
2 years ago
List several examples of applied force, normal force, and friction that you’ve observed in your life.
grandymaker [24]

applied forces would be push for example.

normal forces would seem to be a force such as gravity.

friction for example when you try to slide on carpet but the fabric or whatever its made of stops you.

3 0
3 years ago
0<br> What is 33 C in absolute temperature? hs
AysviL [449]

Answer:

33 Celsius is 306.15 in absolute temperature

7 0
3 years ago
A dad takes his kids to their school just 8.0 miles down the road but with traffic it takes him 30 minutes and the fastest he ca
VARVARA [1.3K]

Answer:C 24 mi/hr

Explanation:

8 0
3 years ago
What are some ways scientists can study the seafloor?
TiliK225 [7]

Answer: A device records the time it takes sound waves to travel from the surface to the ocean floor and back again. Sound waves travel through water at a known speed. Once scientists know the travel time of the wave, they can calculate the distance to the ocean floor.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • How do you prove that the action and reaction forces act on 2 different object according to Newtons III Law of motion.?
    7·1 answer
  • What’s the right one.
    9·1 answer
  • Momentum has a _____.<br> a. direction only<br> b. magnitude only<br> c. direction and magnitude
    14·2 answers
  • Describe the transformation of mechanical energy in a ball when it is thrown straight up and then comes back down
    5·1 answer
  • A person is wandering in woods and records his movements as a sequence of displacements: d1 is 351 m, 35.0° north of east; d2 is
    15·2 answers
  • Bob walks 290 m south, then jogs 630 m southwest, then walks 290 m in a direction 26 ∘ east of north.
    12·1 answer
  • The photons of different light waves:
    6·1 answer
  • Why do astronomers hypothesize that a massive black hole lies at the center of m87?
    12·1 answer
  • Explain what is meant by “In Phase” and “Out of Phase?
    9·2 answers
  • A balloon-powered car rolls across the floor at a speed of 0.711 m/s. How long does it take to cover 8.25 m?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!