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
Which sentence features a shift in tense?
tensa zangetsu [6.8K]
C is the right answer
6 0
4 years ago
DESPERATE!! WILL GIVE BARINLIST AND THANKS
Finger [1]

Answer:

it grabs unto soil and keeps it clamped together it prevents this makes the soil harder to wash away

3 0
3 years ago
Read 2 more answers
¨selective breeding should be more tightly restricted¨- do you agree or disagree with this statement and whyyyyyyyyyyyyy¨
blagie [28]

Answer:

disa gree animals should be aloud to mate with another animal of the same breed freely

Explanation:

7 0
3 years ago
The buoyant force on an object fully submerged in a liquid depends on (select all that apply)
Natasha_Volkova [10]
2. The object's volume.
 3. The density of the liquid.  
Remember what the buoyant force is. It's the lifting force caused by the displacement of a fluid. I'm using the word fluid because it can be either a liquid or gas. For instance a helium balloon floats due to the buoyant force exceeding the mass of the balloon. So let's look at the options and see what's correct. 
 1. Object's mass
 * This doesn't affect the buoyant force directly. It can have an effect if the object's mass is lower than the buoyant force being exerted. Think of a boat as an example. The boat is floating on the top of the water. If cargo is loaded into the boat, the boat sinks further into the water until the increased buoyant force matches the increased mass of the boat. But if the density of the object exceeds the density of the fluid, then increasing the mass of the object will not affect the buoyant force. So this is a bad choice. 
 2. The object's volume.
 * Yes, this directly affects the buoyant force. So this is a good choice. 
 3. The density of the liquid.
 * Yes, this directly affects the buoyant force. You can drop a piece of iron into water and it will sink. You could also drop that same piece of iron into mercury and it will float. The reason is that mercury has a much higher density than water. So this is a good choice. 
 4. Mass of the liquid
 * No. Do not mistake mass for density. As a mental exercise, imagine the buoyant force on a small piece of metal dropped into a swimming pool. Now imagine the buoyant force on that same piece of metal dropped into a lake. In both cases, the buoyant force is the same, yet the lake has a far greater mass of water than the swimming pool. So this is a bad choice.
8 0
3 years ago
The kinetic energy of an object can sometimes be greater than a potential energy a originally possessed, true or false?
Mamont248 [21]

Answer:

true

Explanation:

Energy stored in the nuclei of atoms can be used to generate electricity. ... Most of the energy of food is converted to heat.

4 0
3 years ago
Read 2 more answers
Other questions:
  • If a block of copper measures 2.00 cm x 4.00 cm x 5.00 cm and weighs 356 grams, what is its density?
    6·1 answer
  • The speed of light in a vacuum is 2.998 x 108 m/s. what is its speed in km/h?
    6·1 answer
  • The average adult heart pumps about 84./mls of blood at 72 beats per minute. suppose you need to calculate how long it would tak
    11·2 answers
  • Which needs less heat to increase its temperature,
    6·2 answers
  • A student walks 3 blocks east, 4 blocks north, and 3 blocks west. What is the displacement of the student?
    7·1 answer
  • Plz. Help. It is due tomorrow.
    9·1 answer
  • What's a dependent variable?
    14·2 answers
  • an object starts from rest with a constant acceleration of 8.0m/s^2 along a straight line.find the average speed for 5 second in
    15·1 answer
  • A 10 g dime and a 200 g gold coin are dropped from the Empire State Building in
    12·1 answer
  • <img src="https://tex.z-dn.net/?f=%20%20%5Clarge%7B%5Crm%7BQuestion%3A%7D%7D" id="TexFormula1" title=" \large{\rm{Question:}}"
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!