Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to call another .fig and its .m file when click on subplot

1 回表示 (過去 30 日間)
Raghvendra Tiwari
Raghvendra Tiwari 2017 年 2 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hey there, I am interacting with multiple arduino board at same time, and according to total no of serial port I am ploting graph (in dummy.fig and dummy.m) for each and every port, but i need to open another UI file (Which I coded earlier it have first.m and first.fig) and I need to send parameter port number, means when user will click on COM5's subplot then I need to send "COM5" as parameter to first.m file.
here is my code for subplot and its click event
a = 4; % this will be length_of_AvailablePort sendPortName = {'COM5','COM6','COM5','COM6','COM5','COM6','COM5','COM6'}; % this will be portname x = linspace(0,10); y1 = sin(x);
r = totalPorts(a).rows; c = totalports(a).cols; for i=1:a h =subplot(r,c,i); plot(x,y1); title(sendPortName(i)); set(h, 'ButtonDownFcn', {@first, sendPortName(i)});
end
but i dont know how I can retrieve data in first.m file.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by