Info

此问题已关闭。 请重新打开它进行编辑或回答。

i need an if condition that analyzes data from a for loop

2 次查看(过去 30 天)
how can i express an if condition inside a for loop that expells numbers that are greater than a static number let's say 50
so i do not want to the resluts that are more than 50 to show up in my results

回答(1 个)

Walter Roberson
Walter Roberson 2019-4-23
The easiest way is to filter after you have stored everything:
YourVariable(YourVariable>50) = [];
  1 个评论
Omar Almahallawy
Omar Almahallawy 2019-4-23
unfortunatly when i use this code, i end up with [ ] with the numbers that don't satisfy the condition

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by