How to give more than one vector as input to polyfit() function?
10 views (last 30 days)
Show older comments
I have a 27x3 matrix of three input variables and one corresponding vector(27x1) as output. I want a polynomial regression equation relating the inputs and the output. The polyfit function gives the following error when given the command: polyfit(input, output, 3)
Error using polyfit (line 48) X and Y vectors must be the same size.
I am new to matlab and so please bear with the noob question. If I am using the wrong function, please let me know the correct procedure for the same.
Thanks in advance,
2 Comments
Jan
on 6 Jun 2015
And what is the relation between the 3 input vectors and the wanted output? Did you read the docs of polyfit? The first input is the vector of X-values and the second the vector of Y-values. So I cannot imagine what you mean by "input" and "output".
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!