How to write as a function, Simulation in MATLAB

Assignment Help:
There are 20 anchorID and sourceID. Actually the concept is we have to target a particular combination of anchorID sourceID anchor channel source channel and agc values and calculate their mean rssi(formula given).This has to be done for all the available 20 combinations.

The information on anchorID sourceID anchor channel source channel can be accessed through BlinkSetList (1565 cells). Further inside this cell consists of different Blinkset in struct format and further inside stays the details of one Blink with the above mentioned parameters.

AnchorID (30,50 ... 1524)
SourceID(30,50,...1524)
AnchorChannel,Source Channel ((0,0),(1,0),(0,1),(1,1))

What I did was I wrote several functions. In every function I kept sourceID as constant through out the function and varied the AnchorID,SourceID, Anchor Channel, Source Channel (agc values to calculate rssi will retrieve automatically since it is coded that way). So this means I have written 20 different functions.

Note: Some combinations do not work because they do not exist.So it returns error.So what I did was I commented the combinations which did not return the output that way I was able to clear all the errors.

My supervisor during discussion said that this is not a efficient one having different functions and he needs one function where the output arguments should be mean of Rssi_dBm,variance,standard deviation and the input arguments be AnchorID,SourceID,Anchorchannel,sourcechannel. So what this basically does is. if we mention a particular Anchor,SourceID it will loop this combination with different combinations of channel and return the values. And if such a combination does not exist it should return NaN or empty matrix or whatsoever and not an error.

Related Discussions:- How to write as a function

.mathematical modelling of coupled tank, deriving the mathematical modelli...

deriving the mathematical modelling of coupled tank using simulink and finally get the reaction curve of coupled tank system

Refrigeration, i want the MATLAB code for properties of refrigerant R134a, ...

i want the MATLAB code for properties of refrigerant R134a, Pentane and VCR Refrigeration cycle. Thanks

Monte Carlo Simulation Assignment, I have an assignment due on Friday about...

I have an assignment due on Friday about Monte Carlo Simulation using Matlab or excel. Please let me know if you can help me or not asap Thank you

System biology-signal transduction, What is the initial concentration of be...

What is the initial concentration of beta-adrenergic in receptor in blood?

Quening model, programming in matlab for queing model

programming in matlab for queing model

Design of a smart grid system, Hello I''d like a design of a SMART micro g...

Hello I''d like a design of a SMART micro grid system for ( Solar, Wind, and hydro technology) to be simulated and an analysis of the result should constitute a professional repo

PLOT in MATLAB, I have a table which consist of 5 variables. I wish to plot...

I have a table which consist of 5 variables. I wish to plot 4variables versus i variable. how to display 4 variables on x-axis

Ampere law, ampere law by matlab simulation?

ampere law by matlab simulation?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd