Info
This question is closed. Reopen it to edit or answer.
Index exceeds matrix dimensions. error
1 view (last 30 days)
Show older comments
so im getting an input error that even my professor had no clue about. When i ran this script on her computer it worked but it wont work on mine please HELP!
x=input('x= ');
a=f1(x);
b=f2(x);
c=f3(x);
d=f4(x);
g=f5(x);
h=[x;a;b;c;d;g];
fprintf('x \t f1 \t f2 \t f3 \t f4 \t f5 \n')
fprintf('%8.6f \t %8.6f \t %8.6f \t %8.6f \t %8.6f \t %8.6f \n',h)
2 Comments
Image Analyst
on 10 Feb 2015
Please copy and paste ALL THE RED TEXT. Don't snip out and paraphrase a small part of the error and expect us to fix it right away.
Image Analyst
on 10 Feb 2015
For example, when I run your code, I get this:
>> test1
x= 4
Undefined function 'f1' for input arguments of type 'double'.
Error in test1 (line 2)
a=f1(x);
So we can't reproduce your error.
Answers (1)
Star Strider
on 10 Feb 2015
The obvious next question: what are ‘f1’ ... ‘f5’? Are they functions or arrays?
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!