フィルターのクリア

How to link a "Checkbox" functionality with "Radiobutton" in appdesigner matlab?

1 回表示 (過去 30 日間)
taimour sadiq
taimour sadiq 2020 年 10 月 7 日
コメント済み: Mario Malic 2020 年 10 月 16 日
Hello.. i m plotting a data of two variables "a" & "b".... two radiobutton for plotting different ranges... i want that radio buttons should plot when i tick the checkbox "Plot"... at present radiobutton are working even if checkbox is active or not.
How to link a "Checkbox" functionality with "Radiobutton"
.. images and file code also attached.

採用された回答

Mario Malic
Mario Malic 2020 年 10 月 8 日
I waited a bit, was hoping that you'll be able to solve it on your own, and I still do. Just reorder your commands, if you want to plot with the checkbox, why the plot commands aren't in that function callback? Your range affects the plot, so you can use it within plot command.
Hint on the Button group: Value says if the button has been pressed or not, text is the title of the button.
app.ButtonGroup.SelectedObject
ToggleButton (button1) with properties:
Value: 1
Text: 'button1'
Icon: ''
Position: [12 41 100 22]
You can use the Text property and strcmpi to detect which button is pressed.
Even though this answer is not actually a proper answer, but I'll post it as one, as motivation to do the task on your own.
  12 件のコメント
taimour sadiq
taimour sadiq 2020 年 10 月 16 日
I successfully added Toggle swithc functionallity... once again thanks for ur support
Mario Malic
Mario Malic 2020 年 10 月 16 日
Well done!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by