Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Save workspace as sub element of structure

$
0
0
Hello,
I am trying to save the current workspace as a sub element of a structure into a database:

save('temp_WS.mat'); % now temp_WS.mat contains all variables like "var1","var2"
load('db.mat'); % shall contain dbcase(1,2...).
dbcase(2)=current_WS; % <---------------------this does not work

The idea is to address a certain variable, "var1"for instance from the workspaces:
dbcase(1).var1 gives value of var1
dbcase(2).var1 gives value of var1, calculated for a different case.

Any ideas?

Viewing all articles
Browse latest Browse all 19628

Trending Articles