How can I overcome the error "variable admit must be of data type logical instead of double".
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
jack Calesaric
am 2 Okt. 2022
Beantwortet: Walter Roberson
am 2 Okt. 2022
How can I overcome the error "variable admit must be of data type logical instead of double"..I have to return logical values true or false using the function below.what is wrong with this?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Okt. 2022
You assign the result of the comparisons to test1 and test2. But then you overwrite test1 and test2 with [] . [] is an empty double precision matrix, and you are overwriting the results of the comparisons.
Notice that the assignment to test1 and test2 are not definitions of the anonymous function, and so do not belong in that section of the code. But you are missing calls to the anonyous function in the test case section...
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Testing Frameworks 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!