Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve with explaination Matlab Write a MATLAB script to; 1. Create a 1 xm 1D array of random real numbers between 5 to 10. Where

image text in transcribed

solve with explaination Matlab

Write a MATLAB script to; 1. Create a 1 xm 1D array of random real numbers between 5 to 10. Where m is user entry between 500 to 1000. Assign the created array to variable R1DA. Note: If a user enters an out of range number, your code should ask again for the entry. Following Lec10, check the rand function for generating random numbers between 0 and 1. You should use this function in this part. 2- Write a local function, named MSD1DA, in your script to take R1DA as an input argument, and output the mean and standard deviation of R1DA. Use variable MN for mean and SD for standard deviation in your function and also in your code. 3- Call MSD1DA in your main code to calculate the mean and standard deviation of RIDA. 4. Plot the RIDA using red dots. In your plot, the X-axis is the element number, and Y-axis is the element value. On this plot, also include a horizontal blue solid-line representing the mean value of R1DA. Additionally, on this plot include two more horizontal green dash-lines showing the standard deviation lines with respect to mean value. Do not forget to include axis labels and legend in your plot. Note: you should not draw the horizontal lines on your plot. You should include these lines by including additional input arguments in the plot command. For example, the mean line can be included in your plot as: Plot ..,[0 m), [MN MN), 'b-'...) Additionally you can explore axis command in MATLAB to see how to set axis limits and aspect ratios of your plot box. For example, include the below command after your plot command in your script. axis([1 m -6 13]); Hint: For example, by running your code for a 750 entry the command window and figure window should represent: This program creates a lxm array of random elements between -5 to 10 Enter the size of the array (your entry should be between 500 and 1000 750 >> GET our code for a NOTE: Save your script as interactive05_Xxx.m and upload it on eClass. Xxx is the last three digit of your student number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is cost plus pricing ?

Answered: 1 week ago

Question

1. What are the types of wastes that reach water bodies ?

Answered: 1 week ago

Question

Which type of soil has more ability to absorb water?

Answered: 1 week ago

Question

Question Can plan participants borrow from a VEBA?

Answered: 1 week ago

Question

Question What is an educational benefit trust and how is it used?

Answered: 1 week ago

Question

Question How are VEBA assets allocated when a plan terminates?

Answered: 1 week ago