Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you help me with these problems? (Matlab) 1. Define a variable called alpha,

ID: 3871715 • Letter: C

Question

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 Euler’s 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)

Explanation / Answer

Dear champ we are supposet answer only 4 subquestions. But I managed to solve many more. So hopefully you will like

1
x = sin(alpha + deg2rad(beta))
= 0.95630

y =
sin(alpha)*cos(deg2rad(beta)) + cos(alpha)*sin(deg2rad(beta))
= 0.95630

z = tan(2*alpha)
-1.7321


2
a 3                                 
b 4                                 
c 0 + 8i                                                
d -25

3.
because acording to MATLAB e(1 +i*pi) = 2.7183. This is due to floating point apoximation error.

4
a. ans = 0                                                   
b. ans = 1
c. ans = 0
d. ans = 1

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote