how to create a class with some properties?

2 views (last 30 days)
Hi everybody,
could you please assist me to create a class in with some properties?
I want to create two communication channel (paths) and want to call on the basis of their properties.
data_rate = 10 mbps
delay = 250 ms
loss rate = 1%
data_rate = 1.5mbps
delay = 50 ms
loss rate = 1%
could anyone please help me to have somesuggestion to make a class or list with these properties please.
Thank you in advance.

Accepted Answer

Eleanor Betton
Eleanor Betton on 3 Feb 2020
Mohmmad Abu Yousuf
Mohmmad Abu Yousuf on 4 Feb 2020
Thank you Guillaume,
truely speaking, I am not very much familiar with OOP.
actually I want to create path1 and path2 with those properties (data rate, delay, loss rate) individually so when I will use anyone of them with a formula then it will automatically take those properties.
for path1,
path1.bandwidth = window size/ delay %window size is predetermined value
so when I will call path1 it will automatically assign the values to the formula. and same for path2.
thank you again.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by