How do I write an if statement for if a variable is an integer, perform a function.
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Temi O
am 27 Feb. 2019
Kommentiert: Temi O
am 1 Mär. 2019
Please, how do I say this? I want to perform a function if Var(i) is an integer?
for i = 1: 1000
Var(i+1) = Var(i) + 100e-4
if Var(i) % condition for if Var(i) is an integer (whole number). How do I write this?
%Perform a function
end
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!