fprintf('the degree symbol exists in the input string.\n');
end
tempStrUnicode will be an array of unicode integers for each character in the string. If 176 exists (is a member) of that array, then you know that the user entered the degree symbol. You can validate if it is the last element of the array (i.e. is in the correct position) if needed.
Alex, I don't think that's what it meant. That would be a very user hostile thing to do -- require the users to know how to enter such a special symbol. Good way for your users to hate you.
I think they wanted you to just print it out on the user interface (GUI or command window) when you give a prompt string in your call to input(), or if you output some string with fprintf() or disp().
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
0 Comments
Sign in to comment.