Solve Complex Equations in MATLAB: Q-Functions and SNR | Homework Help

  • Context: MATLAB 
  • Thread starter Thread starter fahim
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 11K views
fahim
Messages
2
Reaction score
0

Homework Statement



hi... how can i write this equation in matlab

Homework Equations



Pf = Q(Qinverse(Pd)(1+SNR) + SNR * square root(N/2))

where Q is the q function

The Attempt at a Solution


I tried the equation with the following

Pf = qfunc(qfuncinv(Pd)*(1+SNR)+SNR*(sqrt(N./2)));
But it is showing the folowing error
? Error using ==> qfunc at 19
The argument of the Q function must be a real array.

Error in ==> part1 at 5
Pf = qfunc(qfuncinv(Pd)*(1+SNR)+SNR*(sqrt(N./2)));
 
Physics news on Phys.org
Apparently you are getting a complex number from the qfuncinv. You can test this by just looking at what qfuncinv(Pd) yields. I guess it could also be the sqrt, but I'm assuming N > 0.