I like Serena
Science Advisor
Homework Helper
MHB
- 16,335
- 258
I tried:
That works... (Thinking)
Did you perhaps put those functions in script files?
Or are you running the code on the prompt?
Btw, your current functions are not syntactically correct since 'for' has an 'end', but 'function' does not have an 'end'. (Worried)
Code:
t2=[1 2];
y2=[3 4; 5 6];
plot(t2, y2(1,:).^2+y2(2,:).^2, 'y');
That works... (Thinking)
Did you perhaps put those functions in script files?
Or are you running the code on the prompt?
Btw, your current functions are not syntactically correct since 'for' has an 'end', but 'function' does not have an 'end'. (Worried)