how to jump a single for step in a for loop?

18 ビュー (過去 30 日間)
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2019 年 2 月 5 日
I am writing a code for fuel consumption for that i want to use a for loop which calculates Speed of the motor
for k=1:1:150
Speed = k*100
if Speed <1000
% At this point i want to jump this for step
end
torque=15
FuelConsumption=Speed*torque
end
As we can directly catch that i can also start from 10 to avoid this problem
But the same Speed i am using for further calculation where i need the values less than 1000 too.
  5 件のコメント
KSSV
KSSV 2019 年 2 月 5 日
Read about continue
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2019 年 2 月 5 日
thats the perfect solution
thanx alot

サインインしてコメントする。

採用された回答

madhan ravi
madhan ravi 2019 年 2 月 5 日
if ...
continue % just add this inbetween
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by