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
All charged objects create an electric field around them. What two factors determine the strength of two electric fields upon th
V125BC [204]
-- The product of the magnitudes of the two charges.
-- The distance between the centers of the two charges.

The signs of the charges ... whether their signs are the same
or opposite ... determines the direction of the forces, but not
their magnitude.
3 0
3 years ago
Help? its due in like 12 minutes lolzz
Gnom [1K]

Answer:

Question 1: the plates are moving toward one another.

Question 2: The Himalayan Mountains in India

Question 3: Because mountains are formed instead.

Explanation:

The paragraph explains that the plates continue to move closer to one another while forming multiple mountains.

The paragraph explains, " a well-known example of this is the formation of the Himalayan Mountains in India,"

The area of the Himalayan Mountains are better suited for the formation of mountains rather than volcanoes.

Have a nice day!! Good Luck!! Brainliest would be appreciated!!!

4 0
3 years ago
Which statement is true about the thermal energy of an object? Choose the correct answer. 1). Thermal energy is the internal pot
Brums [2.3K]
This thermal energy flows as heat within the box and floor, ultimately raising the temperature of both of these objects.
5 0
2 years ago
While Sophia was driving to work, she tried to avoid hitting an animal and instead hit a parked car. As the car stopped, her bod
Andreyy89
This would be an illustration of Newton's first law of motion. Law of inertia, an object moving at constant velocity will keep moving at constant velocity until a force is acted upon it. Inertia is the tendency of an object to keep moving in a particular direction resisting to change, unless a force acts upon the object.
7 0
3 years ago
Can you plz help me in on 11 12 and 14?
anygoal [31]
I’m pretty sure 14 is mutations
3 0
3 years ago
Other questions:
  • Which part of the ear receives the signal from the cochlea and transmits it to the brain?
    9·2 answers
  • You are walking around your neighborhood and you see a child on top of a roof of a building kick a soccer ball. The soccer ball
    7·1 answer
  • A radar station locates a sinking ship at range 17.3 km and bearing 136° clockwise from north. From the same station, a rescue p
    5·1 answer
  • If I start driving 80 miles per hour down the interstate how far will I go if I Drive for 4.5 hours
    5·1 answer
  • What is thermal energy defined as
    6·2 answers
  • A force of 166 N acts on a 7.05-kg bowling ball for .39 seconds . What is the bowling balls change in velocity
    15·2 answers
  • It takes much longer to bake a whole potato than potatoes that have been cut into pieces why ?
    6·1 answer
  • Se quiere calcular la viscosidad de un líquido por el método de Oswald y se obtienen los siguientes resultados:
    15·1 answer
  • I need the answer with steps
    6·1 answer
  • The
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!