Why I get ans = logical 1

24 Ansichten (letzte 30 Tage)
vincenzo violi
vincenzo violi am 22 Nov. 2020
Kommentiert: vincenzo violi am 22 Nov. 2020
if(Tl > Tup && Tup<TRIS)
disp(Tup);
disp('Tup');
elseif (Tl>Tup && Tup > TRIS)
disp(TRIS);
disp('Tris');
else (Tl < Tup && Tl < TRIS)
disp(Tl);
disp('Tl');
end
Could anyone help me?

Akzeptierte Antwort

Nora Khaled
Nora Khaled am 22 Nov. 2020
in your last case you use else then put a condition.
you should either use "elseif" or no condition.
  1 Kommentar
vincenzo violi
vincenzo violi am 22 Nov. 2020
Really thanks, it actually works well with your tips!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Code Execution 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!

Translated by