write an equation with graph

조회 수: 1 (최근 30일)
Diana Kh
Diana Kh 2020년 7월 29일
답변: Chenguang Yan 2020년 10월 22일
Hello, I need help with writing an equation that has 3 parameters in Matlab and plot the graph of it.
The equation is : Rb= SF * CR* BW/2^SF (bit/sec)
the x-axis is for time and the y-axis is for bits
I want to change the values of 2 parameters and make one stable and see the difference.
any help please ??
  댓글 수: 2
Sriram Tadavarty
Sriram Tadavarty 2020년 7월 29일
Hi Diana,
Can you inclde what the values of SF, CR, BW are? It would be easy to share what you have tried so far and where did you struck? What are the inputs and expected outputs?
Regards,
Sriram
Diana Kh
Diana Kh 2020년 7월 29일
Hi Sriram,
The inputs and their values are :
Spreading factor SF=7,8,9,10,11,12
Code rate CR=1,2,3,4
Bandwidth BW=125,250,500 KHz .
The output name is bit rate Rb and its unit (bit/sec). I want to change the values of 2 parameters and make one stable and see the difference.
hope I have explained it well

댓글을 달려면 로그인하십시오.

답변 (1개)

Chenguang Yan
Chenguang Yan 2020년 10월 22일
This might help you:
SF = [7,8,9,10,11,12];
CR = [1,2,3,4];
BW = [125,250,500];
BW_fixed = BW(1); % fixed Bandwidth
[X_SF,Y_CR] = meshgrid(SF,CR);
Rb= X_SF.*Y_CR.* BW_fixed./2.^X_SF;
surf(X_SF,Y_CR,Rb)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by