Question: Can you help me with these problems? (Matlab) 1. Define a variable called alpha, set it equal to / 3 . Define a variable called
Can you help me with these problems? (Matlab)
1. Define a variable called alpha, set it equal to / 3 . Define a variable called beta, set it equal to 47 . Calculate the following trigonometric expressions and save the results to a different variable for each:
(a) sin( + )
(b) sin cos + cos sin
(c) tan 2
2. Create two variables, a and b, and assign them the complex values 3 + 4i and 3 + 4i, respectively. Compute the following and save the results to a different variable for each case. expressions:
(a) real(a)
(b) imag(a)
(c) a + b
(d) a b
3. Evaluate the following expression and store the result as a variable: e i + 1 = 0. This is known as Eulers Identity and should be true. Think about why Matlab tells you this is false.
4. Evaluate the following expressions, that is, use Matlab to perform the comparison and store the results as a variable.
(a) 1 = 8
(b) 1 10^6 > 1 10^7 2 10^7
(c) e^ j.5236 = cos(30 ) + j sin(30 ) (Again with the Eulers!)
(d) Sum the previous three variables and store the result as a new variable.
5. Create the following variables in your workspace
(a) An array with 1000 elements, starting with 0, incrementing by / 1000
(b) A 20 20 20 array full of numbers chosen from a Gaussian distribution with a mean of 0 and a standard deviation of .5.
(c) An array starting with 20, decrementing by 1 and ending with 1.
(d) Create a plot, using part (a) as the x-axis values, and the function sin(x) as the y-axis.
(e) Create a plot using the result from part (c) as the x-axis, and the 3rd row, 4th column, values 1 to 20 from part (b) for the y-axis. The squeeze command will be useful here (when I say this, it means to use the help or the internet and look up the squeeze command)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
