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
What are the three pins that may be worn below your name on the ffa jacket?
scZoUnD [109]
<span>Highest degree, highest office and highest award are the three pins that may be worn below your name on the ffa jacket.
</span>FFA is the biggest of the profession and specialized student associations in U.S. schools.The National FFA Organization is an adolescent initiative association that has a constructive outcome in the lives of youngsters by building up their potential for head authority, self-awareness and profession accomplishment through education of agriculture.The Motto of FFA is;
"Learning to do, Doing to learn, Earning to live, Living to serve."
8 0
4 years ago
A window washer drops a brush from a scaffold on a tall office building. What is the speed of the falling brush after 3.28 s? (N
valina [46]

Answer:

The speed of washer will be 32.144 m/s

Explanation:

Given that

time t= 3.28 s

Acceleration due to gravity

 g=9.8\ \frac{m}{s^2}

Here acceleration  is constant so we cam apply the motion equation

we know that

v= u + at

At initial condition  u =0 m/s

v= u + at

v= 0 + 9.8 x 3.28

v= 32.144 m/s

So the speed of washer will be 32.144 m/s

6 0
3 years ago
Read 2 more answers
How is Oil bad for the environment?
stepladder [879]
Oil spill on land and in the oceans and kills wildlife like the great barear reef
6 0
3 years ago
Read 2 more answers
What is the least value of an ammeter <br>Is it 1. 0.1<br>2. 0.10<br>3. 0.2<br>4. 0.5​
givi [52]

The least value varies depends on ammeter range. In the given question, ammeter range is not mentioned. So, the least value of an ammeter is 0.1 or 0.5 (depends on ammeter range).

<u>Explanation:</u>

The least value of an ammeter is the measure of the smallest number which can be observed in ammeter. So the least value will be varying depending upon its range. If we consider the range of ammeter is 30 A and the scale readings are 10 numbers, then the least value will be 30/10 = 3 A per scale.

So the least value is determined as \frac{Range of ammeter}{No.of scales}

So among the given options 0.1 is most suitable for an ammeter with range of 3 A with 30 divisions.

3 0
3 years ago
How does the endurance enhance performance in physical activities
White raven [17]

it's Also called aerobic exercise, endurance exercise includes activities that increase your breathing and heart rate such as walking, jogging, swimming, and biking. Endurance activity keeps your heart, lungs and circulatory system healthy and improves your overall fitness.

5 0
3 years ago
Other questions:
  • A scientific theory _______.
    13·2 answers
  • A basketball player jumps straight up for a ball. To do this, he lowers his body 0.300 m and then accelerates through this dista
    8·1 answer
  • Which of the following will not conduct an electrical current?
    6·2 answers
  • What is the main reason why many nuclear power plants are located near bodies of water?
    10·2 answers
  • Identify the position where the cyclist has maximum kinetic energy.
    12·2 answers
  • If you bake a cake in the oven in your kitchen, you can feel the warmth of the oven if you stand next to it. This is an example
    6·1 answer
  • An object moves with a positive acceleration. Could the object be moving with increasing speed, decreasing speed or constant spe
    13·1 answer
  • A shortage or a surplus can exist when the current price is equal to the equilibrium price
    10·1 answer
  • Some chlorine atoms have an atomic mass of 37, while others have an atomic mass of 35. What is the difference between the two ty
    6·1 answer
  • Plot vector R 50m at an angle of 28 degrees wrtto the positive x axis. Find the x and y components of the vector and write it in
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!