modification about long matrix with for loop or while

1 Ansicht (letzte 30 Tage)
mehmet salihi
mehmet salihi am 16 Apr. 2021
need urgent help,
assume u matrix 1st row all column is 30.
after each for loop I want to insert the new V values in u matrix new row start from 2nd column.
for example : operation 1 u=[ 30 30 30;0 0 0;0 0 0] // operation 2 (for loop i = 2) u become u=[ 30 30 30;0 5 5;0 0 0]
operation 3 (for loop i = 3) u become u=[ 30 30 30;0 5 5;0 6 6]
n = 109
m=11
u = zeros(m,n); u(1,:)= 30;
A=109 * 109 matrix, does not matter the numbers;
dy=0.01
for j=2:jm-1
for i =1:nm
B=-u(j-1,:);
V=A\B';
u(j,:)=V';
end
end

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by