MATLAB Answers

Question regarding Matlab level 2 S function

1 ビュー (過去 30 日間)
Sameer
Sameer 2014 年 9 月 2 日
コメント済み: Sameer 2014 年 9 月 3 日
Hello all
I have written a S function and it involves the use of approximatly 15 dialog parameters which are to be passed, as I have written the code so I know the sequence of the parameters but if another person wants to use it then it becomes diffcult to pass in the same order....I would like to know is there any way by which I can buid a parameter box so that each parameter is defined in a seperate line.
right know its being passed as: a,b,c,d.... I want
Amplidude(displayed/asking):a
Value (displayed/asking): b
and so on....
Is it possible? If yes then please guide how can I acheive this.
Regards

  0 件のコメント

サインインしてコメントする。

採用された回答

Kaustubha Govind
Kaustubha Govind 2014 年 9 月 2 日
Yes, you can do this by Masking your S-function block. You can then add this masked block to a library that you can give your users.

  3 件のコメント

Sameer
Sameer 2014 年 9 月 3 日
Hello thanks for answering but unfortunately I am not able to solve my problem using mask.
I was not clear enough while explain my problem, let me try once more.
As we know parameters in the Parameters field of the Level-2 MATLAB S-Function Block Parameters dialog box has to be passed in the same order they are defined inside the S function. I know this order because I created it but my user don't know. So I would like to make it user friendly such that when parameters have to be passed it shows the user which parameter has to to passed and at which position.
Awaiting your reply...
Regards
Titus Edelhofer
Titus Edelhofer 2014 年 9 月 3 日
Hi Sameer,
but your second description indicates even stronger that masking your s-function is the correct way to go. Give it a try: mask the s-function, add parameters on the parameters pane, and since you know the order, you can pass those parameters from the mask to the s-function ...
Titus
Sameer
Sameer 2014 年 9 月 3 日
Got it...Thanks

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by