How can I change a row data in Table, Uitable?

2 次查看(过去 30 天)
I have a table and I can not change my values in my second row, I don't understand..Can you explain please? My code:
Initialize d = 1.12; % I want remplace by %d = [0;1.12;1.12;1.15;1.15;1.15;1.20;1.20;1.20;1.30]
dt = 10;
numFluide = 1; NbreFluide = 10; fluide = 0:1:NbreFluide;
si = 0.30;
%% initialisation variables. t = 0
vol_inj = 0;
MatI = zeros(length(fluide),7);
MatI(1,1) = 0; % colonne1: Numero de fluide
MatI(1,2) = 0; % colonne2: densité
MatI(1,3) = 0; % colonne3: volume de fluide qui dépend du debit
MatI(1,4) = 0; % colonne4: mdTop
MatI(1,5) = 0; % colonne5: mdBottom
MatI(1,6) = 0; % colonne6: hauteur
MatI(1,7) = 0; % pression hydrostatique
%%Incrementation: t + dt
for k = 2:length(fluide)
vol_inj = vol_inj + (Qin * dt); % vol_inj devient apres un fluide
for j = 1:length(fluide)-1
MatI(j,1)= MatI(j+1,1);
MatI(j,2)= MatI(j+1,2);
MatI(j,3)= MatI(j+1,3);
MatI(j,4)= MatI(j+1,4);
MatI(j,5)= MatI(j+1,5);
MatI(j,6)= MatI(j+1,6);
MatI(j,7)= MatI(j+1,7);
end
MatI(length(fluide),1) =(k-1)*numFluide ;
MatI(length(fluide),2) = d ; %HERE DOESN'T WORK WHEN I REMPLACE
MatI(length(fluide),3) = vol_inj ;
MatI(1,4) = 0 ;
MatI(1,5) = 0 ;
for i = 2 :length(fluide)-1
MatI(2,4)= 0
MatI (i+1,5) = MatI(i+1,4) + vol_inj
MatI (i+2,4) = MatI(i+1,5)
end
MatI(length(fluide),6)= abs(MatI(i,4) - MatI(i,5)) ;%THESE PART DOESN4T WORK AND I DON't UNDERSTAND...
MatI(length(fluide),7)= d.*9.81.*MatI(length(fluide),6);
end
set(handles.uitable1,'Data',MatI);
Thanks

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fluid Dynamics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by