フィルターのクリア

line of code help!

4 ビュー (過去 30 日間)
HUH
HUH 2013 年 12 月 3 日
回答済み: dpb 2013 年 12 月 3 日
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

回答 (1 件)

dpb
dpb 2013 年 12 月 3 日
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.

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by