I want to change the size of T so I can Add it to P2 (the size of T should be the size of P1 or the size of P2)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Matthew Worker
el 16 de Sept. de 2021
Comentada: Rena Berman
el 16 de Dic. de 2021
P1=[3 2 4;2 1 1;5 2 3;2 3 7]
P2=[2 6 1;1 3 5;4 2 1;5 2 1];
P1_Zero=pinv(P1)
T=P1_Zero*P1
Q=P2+T
2 comentarios
Image Analyst
el 15 de Dic. de 2021
Original question:
I want to change the size of T so I can Add it to P2 (the size of T should be the size of P1 or the size of P2)
P1=[3 2 4;2 1 1;5 2 3;2 3 7]
P2=[2 6 1;1 3 5;4 2 1;5 2 1];
P1_Zero=pinv(P1)
T=P1_Zero*P1
Q=P2+T
Respuesta aceptada
Awais Saeed
el 16 de Sept. de 2021
Editada: Awais Saeed
el 16 de Sept. de 2021
P1=[3 2 4;2 1 1;5 2 3;2 3 7];
P2=[2 6 1;1 3 5;4 2 1;5 2 1];
P1_Zero=pinv(P1);
T=P1_Zero*P1;
% create a new matrix of dimension equal to max(T,P2)
C = zeros(max(size(T), size(P2)))
% Make C(size(T)) = T. rest = zero
C(1:size(T, 1), 1:size(T, 2)) = T
% Add both EQUAL matrices now
C = C + P2
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Distribution Plots 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!