How do I change workspace variable?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aggie
am 11 Sep. 2014
Beantwortet: Image Analyst
am 11 Sep. 2014
I am doing a bubble sort in MATLAB and when I run my code, the array is popping up in the workspace and it is named ans
I need that to be named something else. How would one change that ans to a different variable?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
Image Analyst
am 11 Sep. 2014
That's what MATLAB calls a result of an expression when you aren't accepting the result into your own variable. For example
4*pi % Not being set equal to anything, it's just by itself.
To get rid of it, simply accept the answer into a variable of your own naming:
myVar = 4 * pi
0 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!