How to write these formulas in Matlab?

In summary, the conversation is about a new user asking for help in writing formulas in MATLAB. They are trying to write a code that displays t_{f} values as p_{f} is increased from 0 to 0.5, but are struggling and asking for assistance. Another user suggests using a for loop and encourages the new user to put in some effort before asking for help. A third user asks about plotting a 3D graph using MATLAB and provides some information about their data.
  • #1
r.valice
2
0
Hi, all. I'm new with Matlab. Anyone knows how to write these formulas in Matlab?


Homework Statement



I need to write the following formulas in Matlab. The definitions are as follows.

1. [tex]p_{f}[/tex]: the wireless link layer frame error rate
2. [tex]\tau[/tex]: the wireless link layer inter-frame interval
3. [tex]p_{i,j}[/tex]: the probability that the first frame transmitted by the node is received correctly by the router, being the [tex]i[/tex]th retransmitted frame at the [tex]j[/tex]th transmission trial.
4. [tex]t_{f}[/tex]: the one-way frame transportation delay between the node and router.

5. n = 3
6. [tex]p_{f}[/tex] = 0 ~ 0.5
7. [tex]\tau[/tex] = 20ms


Homework Equations



Please, see the attached picture where the formulas appear.

The Attempt at a Solution



I'm trying to write it many times. I spent with it for a couple of days, but I cannot.

What I want to have is the MATLAB code that displays [tex]t_{f}[/tex] values as [tex]p_{f}[/tex] is increased from 0 to 0.5.

Thanks in advance!
 

Attachments

  • 1.png
    1.png
    4.2 KB · Views: 555
Physics news on Phys.org
  • #2
Do you know how to implement a summation using a for loop? It's probably helpful for you to show us what you have done.
 
  • #3
Umm...actually, I don't have any ideas for solving it. I'm expecting people who knows a bit about Matlab can do it easily. But, I cannot do it because I just started to use Matlab this month.

Thanks.
 
  • #4
r.valice said:
Umm...actually, I don't have any ideas for solving it. I'm expecting people who knows a bit about Matlab can do it easily. But, I cannot do it because I just started to use Matlab this month.
Sure there are people here who could do it easily, but I doubt that anyone will without you putting some effort into it first. We're not here to do your work for you, but are more than willing to help steer you in the right direction.
 
  • #5
hai..i want to ask ..how to plot 3D graph using matlab...i just have the data...don't have da function of x,y or z..please help me..
 

1. How do I write a mathematical formula in Matlab?

To write a mathematical formula in Matlab, you can use the basic arithmetic operators such as addition (+), subtraction (-), multiplication (*), and division (/). You can also use functions like sin, cos, exp, sqrt, etc. to perform more complex calculations. Additionally, you can use parenthesis to group operations and follow the standard order of operations.

2. Can I use variables in my formulas in Matlab?

Yes, you can use variables in your formulas in Matlab. You can assign values to variables using the equal sign (=) and then use those variables in your mathematical expressions. This allows for more flexibility in your calculations and makes it easier to reuse values in multiple equations.

3. How do I write a subscript or superscript in Matlab?

To write a subscript in Matlab, you can use the underscore (_) symbol and for superscripts, you can use the caret (^) symbol. For example, x1 can be written as x_1 and x2 can be written as x^2.

4. How can I plot a formula in Matlab?

To plot a formula in Matlab, you can use the "plot" function. First, define the range of values for the variable in your formula using the "linspace" function. Then, use the defined variable and formula in the "plot" function. You can also add a title, labels, and customize the appearance of the plot using different parameters.

5. Can I save my formulas in Matlab for future use?

Yes, you can save your formulas in Matlab for future use. You can create a script file or a function that contains your formulas and save it with a .m extension. This way, you can easily access and use your formulas in future Matlab sessions without having to rewrite them each time.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Special and General Relativity
Replies
12
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
3K
Replies
4
Views
3K
  • Programming and Computer Science
Replies
4
Views
664
Replies
12
Views
9K
  • STEM Academic Advising
Replies
13
Views
2K
Replies
6
Views
5K
Back
Top