Hi everyone!
I'm trying to call a m-file (I named it as 'trycall') in another m-file (I named it as 'callnow'),
in trycall I write:
y = 2x + 3;
in callnow I write:
clcclearx = 10;trycall;z = y;
this is what I get when I ran the code:
Error: File: trycall.m Line: 1 Column: 6Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. Toconstruct matrices, use brackets instead of parentheses.Error in callnow (line 5)trycall;
I save them both in the same directory (I save them in Desktop).
I don't have any idea what I do wrong. What am I supposed to do?
Any help would be appreciated. Thank you! Have a good day.
Best Answer