Filter löschen
Filter löschen

line of code help!

4 Ansichten (letzte 30 Tage)
HUH
HUH am 3 Dez. 2013
Beantwortet: dpb am 3 Dez. 2013
I was wondering if someone could help me diagnose what the 3rd to last line of code - y{jj,ii}(:,(ii+1):end) = x{jj}(:,(ii+1):end); -- does for this block.
for jj = 1:N
y{jj,1} = ones(N+1);
y{jj,1}(:,2:end) = x{jj}(:,2:end);
A(jj,1) = det(y{jj,1});
y{jj,ii} = ones(N+1);
y{jj,ii}(:,1:(ii-1)) = x{jj}(:,1:(ii-1));
y{jj,ii}(:,(ii+1):end) = x{jj}(:,(ii+1):end);
A(jj,ii) = det(y{jj,ii});
end

Antworten (1)

dpb
dpb am 3 Dez. 2013
for jj = 1:N
...
y{jj,ii}(:,1:(ii-1)) = x{jj}(:,1:(ii-1));
y{jj,ii}(:,(ii+1):end) = x{jj}(:,(ii+1):end);
...
end
Just loading the columns of the array from (ii+1)th to the last similarly as does the preceding line load from the first column to the (ii-1)th. The two lines together load all columns excepting for ii.
doc end
if it's that that's confusing -- it's a builtin that's position-sensitive as to what it returns, specifically.

Kategorien

Mehr zu Schedule Model Components finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by