Transformation struct to array
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Pavel Aksentsev
el 12 de Mzo. de 2022
Respondida: Walter Roberson
el 12 de Mzo. de 2022
HI, why is it not work?
xdata=[1];
n=3;
subs(eqn,y,n);
st=solve(eqn,x);
xdata(n)=struct2cell(st);
Error:
Check for missing argument or incorrect argument data type in call to function 'struct2cell'.
1 comentario
Respuesta aceptada
Walter Roberson
el 12 de Mzo. de 2022
solve returns a struct only if you are solving for more than one variable and the number of outputs does not match the number of variables (though 'returnconditions' may affect this)
You are solving for a single variable without returnconditions so you will get a symbolic output not a struct
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Cell Arrays 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!