Azzera filtri
Azzera filtri

line of code help!

4 visualizzazioni (ultimi 30 giorni)
HUH
HUH il 3 Dic 2013
Risposto: dpb il 3 Dic 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

Risposte (1)

dpb
dpb il 3 Dic 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.

Categorie

Scopri di più su Schedule Model Components in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!

Translated by