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

Managerial decision support Linear programing, The advertising director for...

The advertising director for Diversity Paint and Supply, a chain of four retail stores on Chicago’s North Side, is considering two media possibilities. One plan is for a series of

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

Z - transfer function, This question examines the addition of a (synthetic)...

This question examines the addition of a (synthetic) echo to the voice recording, such as would be found in a reverberant room. To do this, use a difference equation of the form

Use matlab to find vrms of the pulse train, Q. A periodic sequence of expon...

Q. A periodic sequence of exponential wave forms forms a pulse train whose first cycle is represented by v(t) = [u(t) - u(t - T 0 )]vAe -t/TC Use MATLAB to find Vrms of the

Pid tuning methods, The scope of work is to investigate and report PID tuni...

The scope of work is to investigate and report PID tuning methods and to confirm their suitability for 2nd and 3rd Order Servo Mechanisms on a simulated system model utilising Matl

Illustrate ideal cellular density, Background Protein therapeutics are a ma...

Background Protein therapeutics are a major component of the biotechnology industry, with sales estimated in the range of ~$99bn annually (2011) and steady market growth. Many phar

Algebra, The sum of 3 consecutive even integers is 276. find the integers

The sum of 3 consecutive even integers is 276. find the integers

Excel 1, working the tool bar in excel

working the tool bar in excel

Radical expression, An object 4.8 feet tall casts a shadow that is 14.4 fee...

An object 4.8 feet tall casts a shadow that is 14.4 feet long. How long in feet would the shadow be for an object which is 19.5 feet tall?

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