フィルターのクリア

how to preallocate rows or columns of matrix through iteration?

6 ビュー (過去 30 日間)
vishnu
vishnu 2020 年 1 月 27 日
編集済み: vishnu 2023 年 4 月 9 日
hello, good morning everyone. please help me to preallocate the 'locs', thankyou.
clc; clear all;
I = zeros(151,151);
W=64;
%locs=zeros(151,1);
for
x = ;
y = ;
end

採用された回答

Walter Roberson
Walter Roberson 2020 年 1 月 27 日
locs = zeros(length(X), length(Y)) ;
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 1 月 27 日
Use
locs = false(size(I));
vishnu
vishnu 2020 年 1 月 27 日
it works now. so many thanks :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by