how to use who to get a list of variable in the workspace and then use them as variables in a function?

3 views (last 30 days)
>> who
Your variables are:
Angle2G_1_phi90 Angle5G_3_tot_th90 Power2G_5_th90 Angle2G_1_th90 Angle5G_4_phi90 Power2G_5_tot_th90 Angle2G_1_tot_th90 Angle5G_4_th90 Power2G_6_phi90 Angle2G_2_phi90 Angle5G_4_tot_th90 Power2G_6_th90 Angle2G_2_th90 Angle5G_5_phi90 Power2G_6_tot_th90 Angle2G_2_tot_th90 Angle5G_5_th90 Power5G_2_phi90 Angle2G_3_phi90 Angle5G_5_tot_th90 Power5G_2_th90 Angle2G_3_th90 Angle5G_6_phi90 Power5G_2_tot_th90 Angle2G_3_tot_th90 Angle5G_6_th90 Power5G_3_phi90 Angle2G_4_phi90 Angle5G_6_tot_th90 Power5G_3_th90 Angle2G_4_th90 Power2G_1_phi90 Power5G_3_tot_th90 Angle2G_4_tot_th90 Power2G_1_th90 Power5G_4_phi90 Angle2G_5_phi90 Power2G_1_tot_th90 Power5G_4_th90 Angle2G_5_th90 Power2G_2_phi90 Power5G_4_tot_th90 Angle2G_5_tot_th90 Power2G_2_th90 Power5G_5_phi90 Angle2G_6_phi90 Power2G_2_tot_th90 Power5G_5_th90 Angle2G_6_th90 Power2G_3_phi90 Power5G_5_tot_th90 Angle2G_6_tot_th90 Power2G_3_th90 Power5G_6_phi90 Angle5G_2_phi90 Power2G_3_tot_th90 Power5G_6_th90 Angle5G_2_th90 Power2G_4_phi90 Power5G_6_tot_th90 Angle5G_2_tot_th90 Power2G_4_th90 Angle5G_3_phi90 Power2G_4_tot_th90 Angle5G_3_th90 Power2G_5_phi90
these are strings and I want to use them like.
>> a = who
a =
'Angle2G_1_phi90'
'Angle2G_1_th90'
'Angle2G_1_tot_th90'
'Angle2G_2_phi90'
'Angle2G_2_th90'
'Angle2G_2_tot_th90'
'Angle2G_3_phi90'
'Angle2G_3_th90'
'Angle2G_3_tot_th90'
'Angle2G_4_phi90'
'Angle2G_4_th90'
'Angle2G_4_tot_th90'
'Angle2G_5_phi90'
'Angle2G_5_th90'
'Angle2G_5_tot_th90'
'Angle2G_6_phi90'
'Angle2G_6_th90'
'Angle2G_6_tot_th90'
'Angle5G_2_phi90'
'Angle5G_2_th90'
'Angle5G_2_tot_th90'
'Angle5G_3_phi90'
'Angle5G_3_th90'
'Angle5G_3_tot_th90'
'Angle5G_4_phi90'
'Angle5G_4_th90'
'Angle5G_4_tot_th90'
'Angle5G_5_phi90'
'Angle5G_5_th90'
'Angle5G_5_tot_th90'
'Angle5G_6_phi90'
'Angle5G_6_th90'
'Angle5G_6_tot_th90'
'Power2G_1_phi90'
'Power2G_1_th90'
'Power2G_1_tot_th90'
'Power2G_2_phi90'
'Power2G_2_th90'
'Power2G_2_tot_th90'
'Power2G_3_phi90'
'Power2G_3_th90'
'Power2G_3_tot_th90'
'Power2G_4_phi90'
'Power2G_4_th90'
'Power2G_4_tot_th90'
'Power2G_5_phi90'
'Power2G_5_th90'
'Power2G_5_tot_th90'
'Power2G_6_phi90'
'Power2G_6_th90'
'Power2G_6_tot_th90'
'Power5G_2_phi90'
'Power5G_2_th90'
'Power5G_2_tot_th90'
'Power5G_3_phi90'
'Power5G_3_th90'
'Power5G_3_tot_th90'
'Power5G_4_phi90'
'Power5G_4_th90'
'Power5G_4_tot_th90'
'Power5G_5_phi90'
'Power5G_5_th90'
'Power5G_5_tot_th90'
'Power5G_6_phi90'
'Power5G_6_th90'
'Power5G_6_tot_th90'
>> deleteNaN(a)

Answers (1)

Walter Roberson
Walter Roberson on 30 May 2012

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!