I want to fit the second degree equation to the graph like shows.
I have already "From workspace" blocks and "Scope" blocks
.
Now my problem is how do I fit second degree graph. I have already "constant" block where I have "cars" matrix. Then I have "ramp" block which creates slope between 1-365 like shows.
Then I have "Least Squares Polynomial Fit" and "Polynomial Evaluation" blocks . What I am doing wrong because it isn't working?
This is my matlab code:
n = importdata('n.txt',';')
cars = n(:,2)
trucks = n(:,3)
bus = n(:,4)
t = linspace(1,365,365)
t = transpose(t)
It gives me error "Error in port widths or dimensions. Output port 1 of .. is a [32x3] matrix." and "The number of rows of input A must match the number of rows of input B."