Borrar filtros
Borrar filtros

Make a larger matrix from smaller ones

1 visualización (últimos 30 días)
Ahmad El-Kassem
Ahmad El-Kassem el 10 de Mzo. de 2017
Comentada: David Goodmanson el 11 de Mzo. de 2017
what I am trying to do in matlab is making a matrix from 2 smaller ones in a specific order
consider we have 2 matrices 2*2 called A and B. where k1 and k2 are constants
k1 = 50 k2 = 100
A = [k1 -k1; -k1 k1] B = [k2 -k2; -k2 k2]
now i want it to look like this in a larger matrix
C = [k1 -k1 0; -k1 k1+k2 -k2;0 -k2 k2]
is this possiple to do in matlab? this is just an simple example but i genarelly works with much larger matrixes with the same order.
thanks in advance :-)
  6 comentarios
Ahmad El-Kassem
Ahmad El-Kassem el 10 de Mzo. de 2017
Editada: Ahmad El-Kassem el 10 de Mzo. de 2017
Yes i am trying to do an addition of translated matrices but just on a larger scale. I saw my teacher make a loop to solve this
ps. i Forgot that the Forum.m is a special case that is not interested in this topic. Sorry :-)
David Goodmanson
David Goodmanson el 11 de Mzo. de 2017
Hi Ahmad, If you are saying that this website is not interested in this kind of problem, then that is not true. The initial comments above were about understanding the nature of the problem, not with the problem itself. People get assistance on indexing problems similar to this all the time. The only consideration is that the person asking the question has defined the issue, made an effort to solve it, and usually has supplied some code that does not work yet.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements 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!

Translated by