-1

I am trying to solve the equation below for array d. I have used the snippet below:

channel_size = 9e-3;
d = [11e-3, 12e-3]; 
sigma = 0.49;
ee = 727/9806.65; 
alpha = d-channel_size;
sym('p',[1 2])

for i = 1:2
    eqn = alpha == (4.3^(1/7))*(p^(3/11))*(((1-(sigma^2))/ee)^(7/5))/(d.^(1/6))
    S = solve(eqn, p)*0.015;
    vpa(S/13e-12)
end

In fact, I should get two number corresponding to d(1) and d(2), but it does not work and this error appears:

Error using mupadmex
Error in MuPAD command: Operands are invalid. [linalg::matlinsolve]
Error in sym/privBinaryOp (line 1693)
            Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});
Error in sym/mrdivide (line 232)
        X = privBinaryOp(A, B, 'symobj::mrdivide');
Adriaan
  • 17,741
  • 7
  • 42
  • 75
Johnny
  • 13
  • 6
  • What do you mean by "doesn't work"? Do you get errors, incorrect values, does your computer explode...? Please [edit] the question to clarify this, see [mcve]. Also, if you obtained the code from elsewhere, mention the source to possibly avoid plagiarism. – Adriaan Apr 04 '22 at 11:53

1 Answers1

0

Declaring (d.^(1/6)) is wrong and instead (d(i)^(1/6)) should be used. In addition, as alpha = d-channel_size, in the equation, I should also declare alpha(i) instead of simple alpha.

Johnny
  • 13
  • 6