flow control with functions of matrices
1 回表示 (過去 30 日間)
古いコメントを表示
Viesturs Veckalns
2017 年 10 月 16 日
回答済み: Walter Roberson
2017 年 10 月 16 日
theta is a matrix [0:0.01:0.5]*pi
I want to evaluate a function t using a flow control of values of theta:
if theta>pi*(1/2 - 0.01)
t=Inf
else
t = tan(theta)
end
How to achieve such a flow control when theta is a matrix? t is assumed to be a matrix with the same dimensions as theta.
0 件のコメント
採用された回答
Walter Roberson
2017 年 10 月 16 日
t = inf(size(theta));
mask theta <= pi*(1/2 - 0.01);
t(mask) = tan(theta(mask));
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!