I create the following function and save it as define.m
function [s_a,s_b] = Define(a)s_a=a;s_b=a;
When I execute the following command in MATLAB 7.1 (R14SP3) and MATLAB 7.0.4 (R14SP2):
[a,b]=eval(['Define(10)'])
I receive the following error:
??? Error using ==> eval One or more output arguments not assigned during call to "eval"
But when I execute:
eval(['Define(10)'])
It works and I obtain the following result:
ans=10;
When I try:
[a,b]=eval(['Define(10)'])
In MATLAB 7.0.1 (R14SP1) it works fine with the following warning message:
Warning: Could not find an exact (case-sensitive) match for 'Define'. ...\define.m is a case-insensitive match and will be used instead. You can improve the performance of your code by using exact name matches and we therefore recommend that you update your usage accordingly. Alternatively, you can disable this warning using warning('off','MATLAB:dispatcher:InexactMatch').
Best Answer