How to create a multi-dimensional cell?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Willemijn Wolf
el 16 de Jul. de 2016
Respondida: Image Analyst
el 16 de Jul. de 2016
I am working with a toolbox, of which I can't access the source code (.p file). For solving a multi dimensional problem, I need to create a cell, telling that all my d-variables (d=200 for instance), follow a normal distribution. For d=2, creating this cell is: {'normpdf(0,1)', 'normpdf(0,1)'} Is there an easy way to create this cell for d=200? Thank you for your help!
0 comentarios
Respuesta aceptada
Image Analyst
el 16 de Jul. de 2016
Try using repmat:
myString = 'normpdf(0,1)';
ca = {myString}; % First make one cell.
ca200 = repmat(ca, 1, 200) % Now replicate it out to 200
0 comentarios
Más respuestas (1)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!