matlab level 2 sfunction
2 views (last 30 days)
Show older comments
hai,
i am trying write an level 2 matlab s function for addition of two numbers. the code is
function anil4sfun(block)
function setup(block)
block.numdialogprms = 1;
block.dialogprmstunable = {'Tunable'};
block.numinputports = 1;
block.numoutputports = 1;
block.setprecompinpportinfotodynamic;
block.setprecompoutportinfotodynamic;
block.inputport(1).dimenssions = 1;
block.inputport(1).directfeedthrough = true;
block.outputport(1).dimenssions = 1;
block.regblockmethod('outputs', @output);
function output(block)
block.outputport(1).data = block.inputport(1).data + block.dialogprm(1).data;
.
when i try to run the code with level2 sfunction block with simple constant block and display block. it is giving the error "The expected number of dialog parameters of 'anil_prm/Level-2 M-file S-Function' (0) does not match the number of dialog parameters specified in the M-S-Function parameters dialog box (1)."
can anyone tell me why i was getting an error and how to get rid of it.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!