controlling array data when calculating
12 ビュー (過去 30 日間)
古いコメントを表示
im try to avoiding having a w = 0. how do i code this?
a = 10;
w = -a:(a/1000):a
F = 2*sin(a*w)./w;
0 件のコメント
採用された回答
Image Analyst
2013 年 9 月 8 日
Another way is to just delete the element where w=0:
w(w==0) = [];
0 件のコメント
その他の回答 (2 件)
Azzi Abdelmalek
2013 年 9 月 8 日
編集済み: Azzi Abdelmalek
2013 年 9 月 8 日
a = 10;
w = -a:a/1000:a;
F = 2*sin(a*w)./w;
tol=0.01
idx=find(abs(F)<tol)
[w(idx)' F(idx)']
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!