I've got the error Output argument "val" (and maybe others) not assigned during call to "yt". yt(x) funtion:
function [val] = yt(x)
if ((-9<=x) & (x<-3)) | ((3<=x) & (x<=9))
val = sin(5*x);
elseif (-3<=x) & (x<3)
val = cos(x) - cos(3) - sin(15);
end
and i call the function using the following
I've got no output from this.
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/387547-error-in-function-at-if-elseif#comment_544068
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/387547-error-in-function-at-if-elseif#comment_544068
Sign in to comment.