フィルターのクリア

the code doesn't exit when we apply the swift waveform

1 回表示 (過去 30 日間)
Surik Ahmed
Surik Ahmed 2023 年 2 月 21 日
コメント済み: Surik Ahmed 2023 年 2 月 24 日
my code has not any errors before applying the swift waveform excitation. So I have the code for simulating ion trajectories in an ion trap code + swift waveform. what I need is to add swift waveform excitation into it. In the Electricity function, I added then some errors that appeared from calculate array function like this one (Unable to perform assignment because the size of the left side is 1-by-10 and the size of the right
side is 2000000-by-10. and others errors

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 2 月 21 日
you appear to have code that should iterate two million times, but somewhere in the calculation instead of using a vector indexed at the iteration number, you have used the entire vector.
For example
x = 1:10;
for k=1:10
y(k) = x.^2;
end
where the right side should be using x(k) instead of the entire x

カテゴリ

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

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by