Skip to main content

Posts

Showing posts with the label multiplication

Prompt the user to enter a number, a random number of times using Matlab

Problem Write a script that will:  Generate a random integer in the range from 2 to 5  Loop that many times to  Prompt the user for a number  Print the sum of the numbers entered thus far with one decimal place There are many signal processing applications. Voltages , currents , and sounds are all examples of signals studied in a diverse range of disciplines such as biomedical engineering , acoustics , and telecommunications . Sampling discrete data points from a continuous signal is an important concept. Solution This problem has been taken from the book A practical introduction to Matlab by Stormy Attaway We will solve this problem by using Matlab for loop and Matlab while loop. Also we will generate a random integer in the matlab using the rand function in Matlab within a given interval. Some of the concepts you need to know to solve this problem are as follows: 1) rand function in Matlab 2) for loop , youtube for loop 3) while loop , yo...