How to save workspace variables in a cell array at specific location (Example: C{1,1}(1,1)) in the same workspace?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want to save a workspace variable at location C{1,1}(1,1) in a cell array which is present in the same workspace. I used this command. It executes in command window but the same logic fails in editor window when written at button callback.
M = 1:10;
M = M';
C = {M};
assignin('base','C',C);
C{1,1}(1,1) = 55;
3 comentarios
Stephen23
el 4 de Mayo de 2017
@Tanzeela Javid: and what happens when you try to execute that line? Do you get a warning, or an error, or the wrong value, or something else...? If you get any warning/error message then please show us the complete message. If it runs but gives an incorrect value (or something else...) then please tell us what you expect and what it does.
Ver también
Categorías
Más información sobre Structures en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!