Complied code not working
Mostra commenti meno recenti
I have a matlab function that works fine inside the matlab environment, but gives an error message when run as a compiled program. Below is a code snippit about the location of the error message;
City = 'A';
while (City ~= 'W') && (City ~= 'L')
City = input('Enter ''W'' for Wellington, ''L'' for Lower Hutt > ', 's');
City = upper(City);
end; % while
The following is the error message when run in a Windows (Win 7 64 bit) shell;
Enter 'W' for Wellington, 'L' for Lower Hutt > W
Operands to the || and && operators must be convertible to logical scalar values
.
Error in erosionimages (line 91)
MATLAB:nonLogicalConditional
Clearly the boolean condition is okay when first entering the while loop (otherwise I'd never get to the input line). I get the same result if I enter 'w', 'W', or 'x'. Line 91 is the end statement.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!