フィルターのクリア

Line of Code works in MATLAB script but not App Developer

1 回表示 (過去 30 日間)
Dea M Turashvili
Dea M Turashvili 2023 年 5 月 24 日
移動済み: Walter Roberson 2023 年 5 月 24 日
The following piece of code is one small section that is giving me a problem out of a much larger project.
for f=1:length(pulsepeaktimes)
allperiods{f}=diff(pulsepeaktimes{f});
pulseperiod(f)= mean(allperiods{f});
end
I am getting the error : "Array indices must be positive integers or logical values"
The confusing part is that obviously the array indices are positive or logical as they are 1:length(pulsepeaktimes. The other important detail is that this piece of code is not working in the MATLAB App Developer, but it works seemlessly when I run the same code in a regular script in MATLAB.
Does anyone have any suggestions or has experienced a similar issue before?

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 5 月 24 日
移動済み: Walter Roberson 2023 年 5 月 24 日
You have a variable named diff or a variable named mean
  1 件のコメント
Dea M Turashvili
Dea M Turashvili 2023 年 5 月 24 日
移動済み: Walter Roberson 2023 年 5 月 24 日
Thank you !! That fixed it

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

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by