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
How many licks dose it take to eat a lolipop
murzikaleks [220]

Answer: Around 364 to 480

3 0
3 years ago
Read 2 more answers
What is the term for substances that have several unpaired electrons and are strongly magnetic
Murljashka [212]

Answer:

Scientific definitions for ferromagnetic

The property of being strongly attracted to either pole of a magnet. Ferromagnetic materials, such as iron, contain unpaired electrons, each with a small magnetic field of its own, that align readily with each other in response to an external magnetic field.

Explanation:

8 0
3 years ago
A positively charged non-metal ball A is placed near metal ball B. Prove that if the charge on B is positive but of small magnit
nordsb [41]

Answer:

D

Explanation:

Ball A is a non positively charged non metal while ball B is metal ball.

Given: The ball B positive charge of small magnitude

To prove: Balls will attract each other

IN this condition because of induction negative charges on the sphere B move to the side closer to sphere A,(induction charging) while the positive charges move to the side further away from sphere A. The polarization of charge on B will cause a greater attractive force than the repulsion of the like charges.

Hence the correct answer will be D .

8 0
3 years ago
A boat is drifting with a speed of 5.0\,\dfrac{\text m}{\text s}5.0 s m ​ 5, point, 0, space, start fraction, m, divided by, s,
zepelin [54]

Answer:

d=42m(-\hat{i})

Explanation:

For this problem, we need to apply the formulas of constant accelerated motion.

To obtain the boat displacement we need to calculate the displacement because of the river flow and the displacement done because of the boat motor.

for the river:

d_r=v*t\\d_r=5m/s*6s\\d_r=30m(\hat{i})

for the boat:

x=\frac{1}{2}*a*t^2\\\\x=\frac{1}{2}*4.0m/s*(6s)^2\\\\\\x=72m(-\hat{i})

So the final displacement is given by:

d=dr+x\\d=30m-72m\\d=42m(-\hat{i})

8 0
3 years ago
Read 2 more answers
Write one example of a physical change and one example chemical change
mojhsa [17]
Physical change = changes the physical properties (more commonly known as it's look)
Chemical change = changes the chemical properties into an entire new chemical form
Examples of physical change would be melting ice cubes or sugar cubes.
Examples of chemical change would be cooking eggs or burning paper because you're changing its chemical properties.
6 0
3 years ago
Other questions:
  • A major process by which the Sun's energy is transported around the Earth system?
    5·1 answer
  • Why are fossil fuels considered nonrenewable resources if they are still forming beneath the surface today?
    5·1 answer
  • A 1200kg car moving at 25m/s has the brakes applied with a deceeration of 8.0m/s^2. How far does the car travel before it stops?
    14·1 answer
  • Finally, you are ready to answer the main question. Cheetahs, the fastest of the great cats, can reach 50.0 miles/hourmiles/hour
    8·1 answer
  • What is the resultant of a and b if a = 3i 3j and b = 3i − 3j?
    11·2 answers
  • How do forces cause a wave
    7·1 answer
  • For a constant force the impulse could be increased by
    10·2 answers
  • A battleship simultaneously fires two shells toward two identical enemy ships. One shell hits ship A, which is close by, and the
    13·1 answer
  • A 1-kg iron frying pan is placed on a stove. The pan increases from 20°C to 250°C. If the same amount of heat is added to a pan
    6·1 answer
  • The kinetic theory describes the __1__ of particles in matter and the forces of attraction between them. The theory assumes that
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!