Get two vectors in the workspace from strings construction ?
Show older comments
Hi, I have the following problem. how can i have access to vectors without typing in the name bur rather by constructing the name of them from two inbuilt for loops (or indices) of string and cell arrays?
my example is:
condition = {'Floor' 'Wall'}
parameters = { 'Skaggs_values' ;'n_fields'; 'Areas'; 'MajorAxisLength'; 'MinorAxisLength' ;'Eccentricity' ;'Orientation' ;'AspectRatio'}
Areas = { [condition{1} '_' parameters{3} ] [ condition{2} '_' parameters{3} ] }
which returns
Areas =
'Floor_Areas' 'Wall_Areas'
In my workspace I have two vectors called Floor_Areas and Wall_Areas, how can i get them ?
Areas =
'Floor_Areas' 'Wall_Areas'
Answers (1)
Azzi Abdelmalek
on 3 Jan 2014
Edited: Azzi Abdelmalek
on 3 Jan 2014
s=1;
assignin('base','out','s')
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!