Filter löschen
Filter löschen

can not update value

1 Ansicht (letzte 30 Tage)
vaya putra
vaya putra am 27 Mai 2019
Beantwortet: vaya putra am 28 Mai 2019
hi Matlab
i have done many time to used iteration for
i want to update value in nwc and hWW put it value from fm.WellModel
but always got errors message
nw = fm.getNumberOfWells(); %2
nwc=nan(nw,1);
hWW=nan(nw,1);
for i = 1:nw
wm = fm.WellModels{i}; %fm.WellModel consist of 2x1 cell array
W = wm.W;
wc = W.cells;
nwc(i)=numel(W(i).cells);
hWW(i)=W(i).hW;
Solving timestep 01/50: -> 2 Days
Index exceeds matrix dimensions.
  5 Kommentare
vaya putra
vaya putra am 28 Mai 2019
thank all, i already solved..
Raghunandan V
Raghunandan V am 28 Mai 2019
Please post the answer. It will help others

Melden Sie sich an, um zu kommentieren.

Antworten (1)

vaya putra
vaya putra am 28 Mai 2019
by modify this script and its work
[nwc,hWW] =deal(nan(nw,1));
for i = 1:nw
wm = fm.WellModels{i};
W = wm.W;
wc = W.cells;
nwc(i)=W.cells;

Kategorien

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

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by