controlling array data when calculating

 Respuesta aceptada

Image Analyst
Image Analyst el 8 de Sept. de 2013
Another way is to just delete the element where w=0:
w(w==0) = [];

Más respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 8 de Sept. de 2013
Editada: Azzi Abdelmalek el 8 de Sept. de 2013
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)']

Categorías

Etiquetas

Preguntada:

el 8 de Sept. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by