How to make a matrix of matrices in Matlab? (to be used to solve a system of linear equations)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I need to make a matrix of matrices in Matlab to later be used when solving a system of linear equations.
I know one solution is to create a mxn cell, and fill each cell with a matrix or vector, but you can't use cells with linsolve(), so this won't help me.
How can I have a matrix of matrices in Matlab?
Thanks!
clarification:
I have one cell structure
A = [25x25 double] [25x1 double] [25x1 double]
[ 1x25 double] [ 0] [ 0]
[ 1x25 double] [ 0] [ 0]
and another
b = [ 0]
[25x1 double]
[ 1]
And I want to do linsolve(A, b). Is this possible?
0 comentarios
Respuestas (1)
José-Luis
el 22 de Ag. de 2012
Yes, you can, you need to use the curly braces:
test = cell(2,1);
test(1) = {rand(10)};
test(2) = {rand(10,1)};
linsolve(test{1},test{2});
Ver también
Categorías
Más información sobre Linear Algebra 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!