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

Clipper and clamper, how to make clipper and clamper in matlab simulation

how to make clipper and clamper in matlab simulation

Desktop setup and introduction to matlab, We learned how to set up our Desk...

We learned how to set up our Desktop on the CAD Lab computer. We created a Matlab shortcut on the Desktop and a CE199 folder for our work. We also learned to type some basic Matlab

Write a simulation program, Consider the M/D/1/n queue (finite waiting room...

Consider the M/D/1/n queue (finite waiting room, that is, a buffer with n waiting positions).  Write a simulation program for this model, and compare the simulation results with th

How to draw a equipotential surface about 3D, We have a set of 3D-points wh...

We have a set of 3D-points who have their value, how to draw a equipotential surface by the value?

Aerospace MATLAB simulation, I need to develop models to vary aileron, rudd...

I need to develop models to vary aileron, rudder characteristics to generate good lift and not very low speeds so the aim is wing modification of an aircraft

Order of operation, #question.explain this math problem 10-3x6+10+(6+1)x4.

#question.explain this math problem 10-3x6+10+(6+1)x4.

Discrete-time response of the system , Consider the control system with a c...

Consider the control system with a controller explained by D(s) = 8.0/s   (a) Using MATLAB, contain the discrete-time unit step response of the system for t=10 seconds        (b

Image Aquisition, I want to use a camera to detect objects by interfacing i...

I want to use a camera to detect objects by interfacing it with matlab ,i need any sourses to help me

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