So, my_program.m is far from perfect. For instance, it has set values for the variables. It would be better if we asked the user for these numbers to make it more flexible. If you want to do this in the Command Window, then the easiest way to do it is to use the input command.
adjacent_side = input('What is the length of the adjacent side of the triangle? ');
This command would get input from a user and store it in the variable adjacent_side.
See if you can modify my_program.m so that the adjacent_side and opposite_side are variables the user inputs. If you get stuck, you can see my solution HERE.
If you want to get text input from a user, you need to specify this in the input command.
participant_name = input('What the participants name? ','s');
Modify my_program.m so that it prompts the use for their name in addition to the adjacent and opposite sides. Have it generate output that looks something like this:
adjacent_side = input('What is the length of the adjacent side of the triangle? ');
This command would get input from a user and store it in the variable adjacent_side.
See if you can modify my_program.m so that the adjacent_side and opposite_side are variables the user inputs. If you get stuck, you can see my solution HERE.
If you want to get text input from a user, you need to specify this in the input command.
participant_name = input('What the participants name? ','s');
Modify my_program.m so that it prompts the use for their name in addition to the adjacent and opposite sides. Have it generate output that looks something like this: