how to run a function in each cells?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sagar
el 5 de Ag. de 2014
Comentada: Sagar
el 5 de Ag. de 2014
Hi, I am using a function 'taylordiag' as follows: [ hp, ht, axl ] = taylordiag ( stn { 1 } (2, : ), stn { 1 } ( 3, : ), stn { 1 } ( 4, : ) );
where stn is a 1*23 cell. I need to execute the function 'taylordiag' in each cells i.e. in stn { 1 }, stn { 2 } .... stn { 23 }, so that I can plot all the points that I need in the same plot obtained by executing 'taylordiag'.
Could you please suggest how to do this?
Thank you,
0 comentarios
Respuesta aceptada
Nade Sritanyaratana
el 5 de Ag. de 2014
Below is an example of using cellfun that may fit what you are looking for:
[HP, HT, AXL] = cellfun(@(x)taylordiag(x(2,:),x(3,:),x(4,:)),stn);
Más respuestas (0)
Ver también
Categorías
Más información sobre Dialog Boxes 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!