Info
This question is closed. Reopen it to edit or answer.
How to call another .fig and its .m file when click on subplot
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!