This question is closed. Reopen it to edit or answer.
How can i make a decicion in order to make my program run after it
1 view (last 30 days)
Duncan Lilley on 11 Dec 2017
It sounds like you want to place your code within an if...end expression. Refer to the documentation page, here.
For checking equality of character arrays, consider using the "strcmp" function. The documentation for this function can be found here.
Another note is that, when using "input", you may want to use the 's' parameter to indicate that you are expecting text input from the user. For more information about this parameter, take a look at the documentation page, here.
Consider the following example:
userInput = input('Enter the word "success": ', 's');
if strcmp(userInput, 'success')