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.
Best Answer