Question: 1. Write a program in a matlab script file that uses variables to calculate and print out the sum of the two numbers. 2. Write

1. Write a program in a matlab script file that uses variables to calculate and print out the sum of the two numbers. 2. Write a program in a matlab script file that asks the user to input the length and height of a rectangle. The program should calculate and print the perimeter and area. 3. Write a program in a matlab script file that asks the user to input any character string containing uppercase letters and prints out its lowercase version. 4. Write a program in a matlab script file that asks the user to input any character string of unknown length and prints out a message to the user identifying and printing out its penultimate character. 5. Write program in a matlab script file that asks the user to input the number of kWh used in a given month and prints out a message that states the charge for the usage in dollars. Assume the charge per KWh is 6.6 cents. Explore the fprintf command to be able to print the message in a format that includes the usage as well as the matlab-calculated charge in standard monetary format (e.g. Your charge for 200 KWh is $13.20') 6. Write a program in a matlab script file that computes the average of the second column of any 2-D matrix (of any size greater than 2 x 2), and display the result in a message to the user. Use the built-in sum and size functions to help do this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
