필터 지우기
필터 지우기

How can I add port label to my Simulink block within C MEX?

조회 수: 4 (최근 30일)
Daniel
Daniel 2012년 12월 14일
Dear All,
I'm looking for a solution how can I add a port label to my Simulink block within my C MEX S function.
The number of the outputs depends on a masked parameter, so I can't define it at the mask statically. I'd like to have similar guise: http://www.mathworks.com/help/simulink/slref/port_label.html
I've checked this one, but It's not working: http://www.mathworks.com/matlabcentral/answers/31360
Kind regards,
Daniel

채택된 답변

Guy Rouleau
Guy Rouleau 2012년 12월 14일
If the port label depends on a mask parameter, it should be possible to do it in the mask, not in the S-Function.
I do not have an example to do exactly what you are looking for, but the Mask Drawing command has access to mask parameters So it should be possible to write mask drawing commands to achieve what you are looking for.
In R2012b, we have added a new set of examples to show typical things done in masks:
We also have a series of posts on masking here:
Those two links should give you some inspiration to implement what you are looking for.
  댓글 수: 1
Daniel
Daniel 2012년 12월 15일
Thank you! Based on your answer I've written a small matlab code into the mask, so I could parse the parameter string and set up the labels correctly.
Kind regards,
Daniel

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by