- When you click "cancel" in the inputdlg(), your variable "tf" is not evaluated.
- When the second part of the code is executed, it regards "tf" as the built-in tf() function.
- You can replicate the same error by doing this "clear tf; tf(1)==1'
- Easiest solution is to name variable "tf" to something else. But still you need to handle the cituation where the variable is not evaluated when "cancel" is clicked.
Operator '==' is not supported for operands of type 'tf'
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ronald Godagandeni Dewage
am 10 Feb. 2021
Kommentiert: Fangjun Jiang
am 11 Feb. 2021
1) Making a dialog box that would take my answers in s1 and compare with s2 and output a cell array.
2) By using the results of the cell array 1 0, 01 or 0 0 i made an if statement to perform calculations
the code runs fine the issue is when press cancel in before i get to this part an error appears as such:
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 10 Feb. 2021
The reason:
3 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Subplots 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!