Filter out negative values
Mostrar comentarios más antiguos
I have the following iterations running But how can I filter out the negative answer and the allow the program just to run on positive values
a=20000:5000:90000
for ct1=1:1:length(a)
b=300:20:460
for ct2=1:1:length(b)
c=150:10:300
for ct3=1:1:length(c)
d=0.5:0.1:0.8
for ct4=1:1:length(d)
e=2000:1000:2300
for ct5=1:1:length(e)
x(ct1,ct2,ct3,ct4,ct5)=a(ct1)+ b(ct2)- (c(ct3))^2 + d(ct4)+ e(ct5)
end
end
end
end
end
Respuesta aceptada
Más respuestas (1)
Mahdi
el 20 de Mayo de 2014
For example, you would use
x(ct1,ct2,ct3,ct4,ct5)=subplus(a(ct1)+ b(ct2)- (c(ct3))^2 + d(ct4)+ e(ct5))
2 comentarios
Arjun
el 20 de Mayo de 2014
Sean de Wolski
el 21 de Mayo de 2014
Learn something new every day.
Categorías
Más información sobre Digital Filtering 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!