controlling array data when calculating
Mostrar comentarios más antiguos
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;
Respuesta aceptada
Más respuestas (2)
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)']
Roger Stafford
el 8 de Sept. de 2013
w = -a:(a/1000.5):a;
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!