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
Suppose you wanted to be able to see astronauts on the moon. What is the smallest diameter of the objective lens required to res
LenaWriter [7]

Answer:

A:1.94

Explanation:

cause that the only one on there

5 0
3 years ago
A detrital rock is named
levacccp [35]
Sedimentary rocks also known as clastic sedimentary rock
3 0
3 years ago
Read 2 more answers
How much refrigerant must a system contain
Scrat [10]
About 10% to 15% of system charge
7 0
3 years ago
A water rocket uses an amount of water and pressurized air to send a plastic rocket several feet into the air. As the water and
Ilya [14]

Answer:

D.

For every action there is an equal and opposite reaction.

Explanation:

im doing the same one lol

6 0
3 years ago
A heat engine: A) converts heat input to an equivalent amount of workB) converts work to an equivalent amount of heat C) takes h
Masja [62]

Answer:

C. Takes heat in, does work, and loses energy heat.

Explanation:

Heat engine is a system makes use of thermal energy (heat) to in order to do mechanical work.

This occurs by converting the heat into mechanical energy. This energy is then used to do work.

The key characteristic of a heat engine is that the substance with which work is done by, goes from a higher temperature to a lower temperature.

Hence, it loses heat as it does work.

3 0
3 years ago
Other questions:
  • Earth is the third planet from the Sun. This placement most affects Earth's unique _____and ______ conditions. 1.A)gravity
    10·1 answer
  • A ball is thrown horizontally from a cliff at a speed of 10 m/s. you predict that its speed 1 s later will be slightly greater t
    6·2 answers
  • if a 10kg object is lifted a distance of 10m from the rest what was the final velocity of the object?
    6·1 answer
  • A shuffleboard disk is accelerated to a speed of 5.8 m/s and released. If the coefficient of kinetic friction between the disk a
    15·1 answer
  • Most of the energy we use today comes from renewable sources/<br> a. True<br> b. False
    9·2 answers
  • The density of ice is 917 kg/m3, and the density of sea water is 1025 kg/m3. A swimming polar bear climbs onto a piece of floati
    15·1 answer
  • What means of motion
    12·1 answer
  • Your mass is 65 kg. you stand on a bathroom scale in an elevator on earth. (a) what force would the scale exert when the elevato
    14·1 answer
  • The angle between incident ray and reflected ray is 60°. What will be  the value of angle of incidence and angle of reflection.?
    15·1 answer
  • The transfer of energy when particles of a fluid move from one place to another is called
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!