GreenPrint
- 1,186
- 0
RESOLVED
Hi,
I don't understand why I'm getting this error. I'm trying to assign the two values equal to variables. The code runs fine when I try not to assign the values to variables but I would like to assign the values to variables. I don't see what I'm doing wrong.
Thanks in advance!
Homework Statement
Hi,
Code:
>>v=[1;2;3;4;5;6];
P=[2494 4157;1247 2078;831 1386;623 1039;499 831;416 693];
[P_300,P_500]=interp1(v,P,5.2,'linear')
Error in ==> interp1 at 79
xOffset = 1;
? Output argument "varargout{2}" (and maybe others) not assigned during call to "C:\Program
Files\MATLAB2\R2011a\toolbox\matlab\polyfun\interp1.m>interp1".
I don't understand why I'm getting this error. I'm trying to assign the two values equal to variables. The code runs fine when I try not to assign the values to variables but I would like to assign the values to variables. I don't see what I'm doing wrong.
Code:
>> v=[1;2;3;4;5;6];
P=[2494 4157;1247 2078;831 1386;623 1039;499 831;416 693];
interp1(v,P,5.2,'linear')
ans =
482.4000 803.4000
Thanks in advance!
Homework Equations
The Attempt at a Solution
Last edited: