Array with complex expression

Gold Member

Homework Statement

I am working on problem 4 in the PDF attachment now, but I will show my code for 2 and 3 since they are related to 4. The values for 2 and 3 were given in the editor.

The Attempt at a Solution

2.
Code:
P = [1.6, 4, 2.9, -8];
N = 3;
PextDown = repmat(P,3,1);
EDU>> PextDown

PextDown =

1.6000    4.0000    2.9000   -8.0000
1.6000    4.0000    2.9000   -8.0000
1.6000    4.0000    2.9000   -8.0000

3.
Code:
D = [7.2;-3.1;1.3];
M = 4;
DextAcross = repmat(D,1,4);
EDU>> DextAcross

DextAcross =

7.2000    7.2000    7.2000    7.2000
-3.1000   -3.1000   -3.1000   -3.1000
1.3000    1.3000    1.3000    1.3000

4.
What the heck are they trying to get me to do with this e^(complex stuff) using these arrays?? I don't really even comprehend the question to start this thing. My current thought is that they want something like this
Code:
fDP =(1/(1+DextAcross.^2+PextDown.^2))+exp(-abs(DextAcross)*cos(DextAcross*PextDown));
Error using  /
Matrix dimensions must agree.

Attachments

• Problem 4.pdf
26.1 KB · Views: 133
Last edited:

fDP = (1./(1+DextAcross.^2+PextDown.^2))+exp(-abs(DextAcross).*cos(DextAcross.*PextDown));
2.0751    0.5974    2.9525    2.0886