sir i can execute the code in command window with same name of output variables which a used in edit window to define function and i am successfully getting the output?
i dont know why sir but i am typing the same code but i get error every time error in myRand>sumAllelements (line 7) summa = sum(V); and error in myRand (line 3) s = sumALLElements(a); please help
Why cannot I just program like: function [a,s]=myRand(low,high) a= low + rand(3,4)*(high-low); s = sumallelement(a); function summ=sumallelement(M) summ= sum(v=M(:));
Amazing is how he always ends the videos with a "lika a boss" style, maybe is the music.
@4:58
I used sumAllelements(a) instead of sumAllelements(m) and it worked fine.
You mean in the second function?
sir i can execute the code in command window with same name of output variables which a used in edit window to define function and i am successfully getting the output?
how do i write a function that does the same thing as fliplr?
i dont know why sir
but i am typing the same code
but i get error every time
error in myRand>sumAllelements (line 7)
summa = sum(V);
and
error in myRand (line 3)
s = sumALLElements(a);
please help
you may not have set the path
can you please help out on this. please
v= M (:);
Summa= sum (v); what does the M imply here??
M is the input of the second function.
As both the functions are different, so both will require different input variables.
Why do I get a "Maximum recursion limit of 500..." -error?
did he reply yet?
Will wait few more years for the reply
@@Ankur5110 🤣🤣
Why the "end" just dissapeared?
Why cannot I just program like:
function [a,s]=myRand(low,high)
a= low + rand(3,4)*(high-low);
s = sumallelement(a);
function summ=sumallelement(M)
summ= sum(v=M(:));
why not, but you'd better write the last line as summ=sum(M(:)), v is meaningless here.
You cannot have two expressions in the same statement...you can simply type summ=sum(M(:));....no need of defining v.
now lets have sandwich !!
sugma