MATLAB AppDesigner | Tutorial 9 | Plotting a graph using axes

  Рет қаралды 72,133

Benito Sebastian

Benito Sebastian

Күн бұрын

Пікірлер: 37
@AmeenAlfiza
@AmeenAlfiza 10 ай бұрын
Thanks for the videos, I think there was a tiny mistake in using the plot function.. I think the right way of using it is this: ........ function PlotButtonPushed(app, event) x = 0:0.01:2*pi; y = sin(x); plot(app.UIAxes,x,y) end
@lestercano3312
@lestercano3312 Ай бұрын
thanks very much. Excellent job...
@lecturesoncontrolandautoma7777
@lecturesoncontrolandautoma7777 4 жыл бұрын
Great contribution
@convolucion1981
@convolucion1981 4 жыл бұрын
great vídeo
@dioutoroo
@dioutoroo Жыл бұрын
Hi Benito, Thanks for your tutorial. I have question, on your plot the x-axis does not exactly represent from 0 to 2xpi, does it? E.g., the value 1 on the y-axis does not show 90 degree value on the x-axis. Can you explain? Thank you
@aRealAndHumanManThing
@aRealAndHumanManThing 9 ай бұрын
If you want the function to have the value 1 at x=90, you'd have to add a converter to degrees. With radians, 90° is Pi/2 which is ~1.57. The Plot reaches y=1 at x=157 or 1.57 (1.57 when using "plot(app.UIAxes,x,y)"), so it's technically correct. You can use the following code to get an approximated plot for x in °: x = 0:360; y = sin(x*0.01745); plot(app.UIAxes,x,y);
@dioutoroo
@dioutoroo 9 ай бұрын
@@aRealAndHumanManThing I see. I have to convert it then. Thanks for clarifying 🙏
@autumn_405
@autumn_405 2 жыл бұрын
Hello Can we somehow display the calculated plot without hitting a button?
@Ahmedali-dw4pt
@Ahmedali-dw4pt 2 жыл бұрын
yes when you run the program it directly shows the plot
@b.conscious
@b.conscious 4 жыл бұрын
Hello! I keep getting an error when I try to run this app. the "plot(app.UIAxes,y)" line keeps gettin the error: 'Too many input arguments'. I even went to the mathworks website and copied and pasted their exact syntax for plotting in app designer and got the same error...how is this so??
@b.conscious
@b.conscious 4 жыл бұрын
also in the MATLAB console, it told me "function plot has the same name a MATLAB built in, suggest renaming the function to avoid name conflict"
@umaRFTW
@umaRFTW 3 жыл бұрын
Did you figure it out? Im curious since im about to start learning this and i felt this to be a common problem
@SJP8Dominicans
@SJP8Dominicans 4 жыл бұрын
Hi Benito, I'm looking to run a graph plotting function from a separate .m file when a button is pressed in my app. I've figured out how to launch the .m file once the button is pressed but i'm a bit stuck on how to plot the graph from my function on the axes in the app itself. Would you be able to point me in the right direction for where to start with this? Thanks in advance!
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
Hi Neil, Thanks for your comment. If your script file is generating the x and y values for plotting, then you can use the evalin function in a callback in the appdesigner to read the x and y values into appdesigner from the workspace. For example in the call back function you would have the following : x = evalin("base",'x'); % Gets x data from workspace "base" means workspace y = evalin("base",'y'); % Gets y data from workspace plot(app.UIAxes,x,y); % Plots x against y Hope that helps, let me know if it works. All the best! Benito
@danielgrisedale7910
@danielgrisedale7910 3 жыл бұрын
Hello , I am wondering if it is possible to show the data from a scope from a simulink model into the axes in app designer ?
@thanismurugathas2929
@thanismurugathas2929 11 ай бұрын
I think it's in his later tutorials
@amadousow6598
@amadousow6598 4 жыл бұрын
Thx for the video i need help, i want use ginput on plot in app designer but i can't .Can you suggest me something?
@TylerMatthewHarris
@TylerMatthewHarris 3 жыл бұрын
use plot(app.UIAxes,x,y); instead ... just putting plot(app.UIAxes,y); screws it up
@kysayki
@kysayki 2 жыл бұрын
Hello I want to make an ellipsoid in appdesigner can you give me some advices ?
@AjeetKumar-oc8sb
@AjeetKumar-oc8sb 4 жыл бұрын
Hello sir, I'm seeing your videos and these are quite useful. I have a different question. How can we add a refresh button in the app, so that if it is used to select a data file, and the file gets updated then It has the recent values? Can you please suggest any idea?
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
Hi Ajeet, You can define the read values as a function and call it every time you click on a refresh button for example.
@maxkase8166
@maxkase8166 3 жыл бұрын
You probably dont give a shit but if you guys are stoned like me atm then you can stream pretty much all of the new movies on InstaFlixxer. I've been watching with my brother lately =)
@ezrabaker2617
@ezrabaker2617 3 жыл бұрын
@Max Kase yup, I have been watching on InstaFlixxer for months myself :)
@MrSocialish
@MrSocialish 3 жыл бұрын
Is there a way to change the bounds of the plot? I don't want it to autofit the function because I can't get a clear view of the entirety of the signal (despite it being autofitted!). I've tried the xlim and ylim functions, but that just pulls up another figure outside of the GUI with the specified bounds.
@aRealAndHumanManThing
@aRealAndHumanManThing 9 ай бұрын
not sure how to do it exactly, but I think the best option would be to have an input prompt via EditField before plotting to get the correct data. You could set all the Limits in another function and maybe reduce the risk for bugs. (I know I'm a bit late but maybe this helps someone with a similar problem)
@Pranavshashi
@Pranavshashi 2 жыл бұрын
Great video! How can I animate the plot in the app designer UIAxes?
@vinaykvk1760
@vinaykvk1760 3 жыл бұрын
how can I use complex numbers as input for the complex calculations
@prithvianilkumar7314
@prithvianilkumar7314 4 жыл бұрын
Can I plot more than one graph in the Same axes using the same push button? Please help
@mianzhou2154
@mianzhou2154 Жыл бұрын
Hello, Do you know how to load or open a .fig file in a axes?
@fenghc1
@fenghc1 4 жыл бұрын
Thanks a lot for your vid. Maybe your x-axis is not correct (0~2pi other than 0~1).
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
Hi Hongchuan, Thanks for watching Hongchuan and yes you are right it should be 0-2pi.
@fenghc1
@fenghc1 4 жыл бұрын
@@BenitoSebastian Thanks for your prompt reply. Can I use imagesc to show an image in UIAxes ?
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
@@fenghc1 Yes, you can use the imshow function to display images in UIAxes. If you are using older versions of Matlab then you will have to replace a button with an image instead of UIaxes.
@fenghc1
@fenghc1 4 жыл бұрын
@@BenitoSebastian Thanks!
@javiseco4614
@javiseco4614 2 жыл бұрын
how to show many functions in the same axes? greetings!!
@toyayaone5258
@toyayaone5258 4 жыл бұрын
Hi Benito, Thank you for these rich videos. I have sent you a e-mail , because I've difficulties in building an app, it gives me an error while running.
@gngh8160
@gngh8160 4 жыл бұрын
how can we find intercept: '
MATLAB AppDesigner | Tutorial 10 | Startup function
5:56
Benito Sebastian
Рет қаралды 48 М.
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,6 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 11 МЛН
MATLAB AppDesigner | Tutorial 15 | Reading and Plotting Data from Excel
8:05
Basic data plotting in MATLAB
9:10
RobertTalbertPhD
Рет қаралды 561 М.
How to Plot Live Data from a Thermistor to MATLAB App Designer
9:43
Matlab Tutorial - 60 - Plotting Functions
9:14
Math and Science
Рет қаралды 277 М.
How to Build a GUI in MATLAB using App Designer
10:26
MATLAB
Рет қаралды 191 М.
MATLAB AppDesigner | Tutorial 12 | Same callback for multiple components
5:48
Graphing a linear equation in Matlab app designer
7:02
Myung World
Рет қаралды 394
Building MATLAB Apps with App Designer
28:31
MATLAB
Рет қаралды 98 М.
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,6 МЛН