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
Click For Summary
SUMMARY

The discussion focuses on implementing the equation Pf = Q(Qinverse(Pd)(1+SNR) + SNR * sqrt(N/2)) in MATLAB, specifically using the Q function and its inverse. The user encountered an error indicating that the argument of the Q function must be a real array, suggesting that the output from qfuncinv(Pd) may be complex. The solution involves verifying the output of qfuncinv(Pd) and ensuring that N is greater than zero to avoid complex results.

PREREQUISITES
  • Understanding of MATLAB programming and syntax.
  • Familiarity with Q functions and their properties.
  • Knowledge of signal-to-noise ratio (SNR) concepts.
  • Basic understanding of complex numbers and their implications in mathematical functions.
NEXT STEPS
  • Investigate the behavior of the qfuncinv function with various inputs in MATLAB.
  • Learn how to handle complex numbers in MATLAB to prevent errors in function arguments.
  • Explore MATLAB's documentation on the Q function for deeper insights.
  • Examine the implications of SNR in communication systems and its mathematical representation.
USEFUL FOR

Students, engineers, and researchers working with MATLAB who need to solve complex equations involving Q functions and SNR in signal processing applications.

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.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K