flow control with functions of matrices
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Viesturs Veckalns
il 16 Ott 2017
Risposto: Walter Roberson
il 16 Ott 2017
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 Commenti
Risposta accettata
Walter Roberson
il 16 Ott 2017
t = inf(size(theta));
mask theta <= pi*(1/2 - 0.01);
t(mask) = tan(theta(mask));
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!