フィルターのクリア

Loop: for i = 1:L ;

7 ビュー (過去 30 日間)
Edfred
Edfred 2023 年 6 月 3 日
回答済み: Torsten 2023 年 6 月 3 日
Hey everyone I have a question regarding the loop as mentioned for i=1:L where e.g. L=400. I have some collected data and for example if I have: data(:,i) = data(:,i-1) * p (p is just a constant) do I have to intialize a value for data(:,i-1) and if yes how for example because I always get the error "Index in position 2 is invalid. Array indices must be positive integers or logical values." because i got the task to do it like that and not to use: data(:,i+1) = data(:,i) * p.
I would be very thankful if someone has an answer for this.

回答 (1 件)

Torsten
Torsten 2023 年 6 月 3 日
because i got the task to do it like that and not to use: data(:,i+1) = data(:,i) * p.
Then use
for i = 2:L

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by