Is there a basic function that renders a vector into its scalar component (ie, turning r1 vector into just r1) in matlab? Trying to simplify some code.
Best you can do I think is to just grab the element that you want, say if it's the nth element,
r1temp = r1(n);
And then clear r1 to delete it. I don't know if you can do:
r1 = r1(n);
and have r1 reassign itself as a scalar. I think it would work but I do not have access to the license server to try it out on my own copy of Matlab at the moment.
Im not sure about this question.. "Is there a basic function that renders a vector into its scalar component" - a vector will generally have more than one scalar component. Maybe if you give an example of your code it will be easier to help.