Help with workspace data extraction shortcut
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Brantosaurus
el 11 de Nov. de 2022
Comentada: Brantosaurus
el 13 de Nov. de 2022
I am trying to extract data from the workspace from various possible locations.
X.output.name.param1(:,end)
X.output.name.param2(:,end)
:
X.output.name.paramN(:,end)
If possible, I would like to try access it via a named parameter, like below.
line 1: param = 'param2';
line 2: y = X.output.name.(param);
Doing this partly appears to work. I can see my data as a 25x3 matrix.
But how do i home in on the 3rd 'end' column by editing line 2, and not line 1?
Regards, Dave
0 comentarios
Respuesta aceptada
Walter Roberson
el 11 de Nov. de 2022
y = X.output.name.(param)(:,end)
3 comentarios
Walter Roberson
el 13 de Nov. de 2022
Works for me
X.output.name.param2 = 1:5;
param = 'param2';
var = 'name';
y = X.output.(var).(param)(:,end)
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!