Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to replace the values of a Matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Good Morning. Waiting for your valuable help. How to replace the values obtained in D in the matrix A and so on and that this is done 5 times.
clc; clear; close all
A=[0 0.84 1.62 2.19 2.69 3.56 4.55 5.11 5.95 6.94;
0 0.71 1.61 2.19 2.87 3.83 4.79 5.62 6.56 7.06;
0 0.93 1.49 2.48 3.15 3.73 4.27 4.86 5.77 6.76];
B=[0 0.84 1.62 2.19 2.69 3.56 4.55 5.11 5.95 6.94;
0 0.71 1.61 2.19 2.87 3.83 4.79 5.62 6.56 7.06;
0 0.93 1.49 2.48 3.15 3.73 4.27 4.86 5.77 6.76];
C=A+B;
D=2.*C
Thank you
2 Kommentare
James Tursa
am 28 Feb. 2018
Please provide the exact desired result for your example. I.e., spell out the values of the result so we can be sure we understand what you want.
Antworten (1)
Fangjun Jiang
am 28 Feb. 2018
Is this what you want?
A=rand(3,10);
B=rand(3,10);
C=A+B;
D=2.*C;
for k=1:5
A=D;
C=A+B;
D=2.*C;
end
1 Kommentar
Diese Frage ist geschlossen.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!