Subject Engineering MATLAB for Engineering

Question

See Question.pdf

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function m = slope(X,Y)
    n=length(X);
    sumX=0;
    sumY=0;
    sumXsquare=0;
    sumYsquare=0;
    sumProductXY=0;
   
    for i=1:n
       sumX=sumX+X(i);%sum of x values
       sumY=sumY+Y(i);%sum of y values
       sumXsquare=sumXsquare+(X(i))^2;%sum of the square of each x value
       sumYsquare=sumYsquare+(Y(i))^2;%sum of the square of each y value...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Related Homework Solutions

Get help from a qualified tutor
Live Chats