Question: in Mathlab %. Answer the following 5 questions by adding or modifying the code * Problem 1: calclulate the Lorentz factor gasma. * Do not
\%. Answer the following 5 questions by adding or modifying the code * Problem 1: calclulate the Lorentz factor gasma. * Do not change the foloowing line V=rand(1);C=3es; 8 Write the expression in terms of V and c by modifying the following line gamma =0 \% Problem 2: Create a matrix and find a logical index \% Generate the following 3 by 5 matrix and name it as p2 * wrtiet the code to find the logical index for the values are larget than \% 10 or smaller than 5 index_P2=0; \% Problem 3: random number \% Write a code to generate a 1 by 20 randon floating number called P3. * These numbers are uniform distributed floating number between 10 and 29. \% Problem 4: Another random number * A study shows the height of 14 years old girls are normally distributed. \% The mean is 1.512 meters and the standard deviation is 8.0741n. \$. Write the code in MATLAB to create a 1 by 1000 array with the above \%4istribution and assign it as P4. * Do not modify the following line. It whill show the distribution of your * random number P4 hist (P4, 3e), xlabel('Meters'), ylable('Density'), title('Hight distribution') \% P5: Create a matrix using command from chs \% Use a combinition from teh following commands \% ones, zeros, diag, eye, fliplr, flipud \% to create the following matrix P5 * You can run this code to test your result. \% Upload this file after you finish the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
