A(B)=[] in anonymous function
Ältere Kommentare anzeigen
A=randi(100,1,100);
A(randi(100,1,10))=[];
The above code works well but how to write it in an anonymous function.
delete_ele=@(X,Y) X(Y)=[]
It throws the error,
delete_ele=@(X,Y) X(Y)=[]
↑
Error: The expression to the left of the equals sign is not
a valid target for an assignment.
How to resolve this issue.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Calculus finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!