How to plot in UIAxes and demo of slider, knob and Gauge in App Designer in MATLAB.

  Рет қаралды 34,731

Programmer World

Programmer World

Күн бұрын

This video shows how to plot a voltage-current-resistance AC current equation in the MATLAB' App Designer tool.
This video use the Slider, Knob, Gauge and UI Axes to demonstrate the plotting of the equation.
Complete Source code is available at:
programmerworl...
We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com

Пікірлер: 44
@essaali9823
@essaali9823 4 жыл бұрын
this is one of the beast KZbin channel that give full instructions of how to built an app
@christianarmandocruz
@christianarmandocruz 3 жыл бұрын
thanks man, I owe you, you saved my grade
@juanpabloalvarezarteaga9653
@juanpabloalvarezarteaga9653 2 жыл бұрын
This video is super usefull. Thank you, and greetings from Mexico!!!
@TechnicallyExplained
@TechnicallyExplained 4 жыл бұрын
nice video...very helpful
@nelsoncastillo4506
@nelsoncastillo4506 6 жыл бұрын
Thanks for this tutorial ,thanks from chile!!!!!
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
You are welcome :-)
@adarshmishra6379
@adarshmishra6379 6 жыл бұрын
nice video, short, simple and rich.
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Thanks :-)
@REDSLibrary
@REDSLibrary 5 жыл бұрын
Very nice
@mominziyaurrahman5750
@mominziyaurrahman5750 4 жыл бұрын
great sir
@prasadadavi6618
@prasadadavi6618 3 жыл бұрын
Good one to begin with 🙏
@samsam-un3cq
@samsam-un3cq 4 жыл бұрын
thank you, it helps my project :)
@josemarioacosta1432
@josemarioacosta1432 5 жыл бұрын
Cheers mate, you saved my life!
@martynbenami7057
@martynbenami7057 3 жыл бұрын
Thanks!
@sahilchawla9339
@sahilchawla9339 5 жыл бұрын
The video was highly informative but the number of ads in between were very frustrating. Anyway thanks for the tutorial.
@ProgrammerWorld
@ProgrammerWorld 5 жыл бұрын
Thanks for your message. I will check for the number of breaks in the video. Thanks for highlighting this.
@mahfuztalukdar5737
@mahfuztalukdar5737 5 жыл бұрын
Thanks a lot
@tallapakaabhishek9181
@tallapakaabhishek9181 3 жыл бұрын
@programmer world I got good info abt app developer tool present in MATLAB from your tutorial. I just need one information becoz I stucked while creating a project. In ur project after clicking start respected based on slider and knob values as output Volt. function is displayed. if we want to hold that plot again for next different inputs it's correcponding output to be displayed is there a way to do such thing mentioned as above. Thanks in advance❤️
@abdelbaseto4169
@abdelbaseto4169 4 жыл бұрын
Tankys
@haziqahizzati113
@haziqahizzati113 3 жыл бұрын
Would you make a video from simulink block to appdesigner that have gauge as the output? I'm trying to follow your step but the output still cannot appear :(
@chandanraaz8425
@chandanraaz8425 3 жыл бұрын
Can u tell me what I should I have to do if I need to take multiple points as input?
@saud674
@saud674 5 жыл бұрын
Can you tell how to put images in axis in UIAxis?
@ProgrammerWorld
@ProgrammerWorld 5 жыл бұрын
For images in App Designer, I have shown it in my below video where I have customized the buttons with images: How to design a simple Game in MATLAB using App Designer? kzbin.info/www/bejne/aXq0fo2HbK91pJI Regarding images in axis, I don’t think that is possible. Axis is mainly for plotting graphs. So, I don’t think there is any use case for putting images in the Axes. If you want to display images in your GUI, you can use buttons as shown in my above video.
@TheUzman99
@TheUzman99 4 жыл бұрын
Would you make tutorial how to send video viewer simulink to appdesigner?
@ProgrammerWorld
@ProgrammerWorld 4 жыл бұрын
I think you should refer to my below tutorials on this topic. Below video shows steps to create a video editor using AppDesigner in MATLAB: kzbin.info/www/bejne/ZpSVXnynmr6ghNk However, below tutorial gives details on how to live-stream data using webcam. kzbin.info/www/bejne/rqGWfKeljMZ6jpo Though none of these videos shows the steps to deal with Video Viewer block but I hope the above videos are helpful in designing video Apps in your AppDesigner.
@jfaycel6446
@jfaycel6446 4 жыл бұрын
I don't find the app designer in my Matlab 2015
@ProgrammerWorld
@ProgrammerWorld 4 жыл бұрын
I am not sure but I think App designer is relatively new feature of matlab. Try a later version say 2017 or 2018 version, you should be able to get App Designer. Good Luck Programmer World programmerworld.co -
@bharatagarwal6330
@bharatagarwal6330 6 жыл бұрын
Hi I am getting an error Error using uiaxes Too many input arguments. Error in uiaxes (line 109) createComponents(app) and when I press start button then i get Error using plot Parent must be a scalar graphics handle. Please suggest
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Most likely there is some issue with the plot command syntax you have used. Recheck it. Copy your Start button callback function and let me have a look.
@bharatagarwal6330
@bharatagarwal6330 6 жыл бұрын
THETA=app.THETASlider.Value; freq=app.FrequencyKnob.Value; Ampl=app.AmplitudeSlider.Value; time=0:0.2:10; volt=Ampl*sin(freq*time+THETA); plot(app.UIAxes , time , volt); for i=1:length(volt) app.Gauge.Value=volt(i); pause(1); end
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Thanks for sharing the code. The callback function looks good. No issues here. From your error message 'Parent must be a scalar graphics handle' ... I suspect that your app.UIAxes is not created properly. I will have to ask you to share the complete code of App Designer. Then I can try to execute that in my environment. I am pasting a part of my code. Please note there is Create UIAxes details in the Private methods in the code. Anyway share the complete code and let me have a look. % App initialization and construction methods (Access = private) % Create UIFigure and components function createComponents(app) % Create UIFigure app.UIFigure = uifigure; app.UIFigure.Position = [100 100 640 480]; app.UIFigure.Name = 'UI Figure'; % Create UIAxes app.UIAxes = uiaxes(app.UIFigure); title(app.UIAxes, 'Title') xlabel(app.UIAxes, 'X') ylabel(app.UIAxes, 'Y') app.UIAxes.Position = [254 222 365 217]; % Create ThetaSliderLabel app.ThetaSliderLabel = uilabel(app.UIFigure); app.ThetaSliderLabel.HorizontalAlignment = 'right'; app.ThetaSliderLabel.VerticalAlignment = 'top'; app.ThetaSliderLabel.Position = [24 424 36 15]; app.ThetaSliderLabel.Text = 'Theta'; .........................................
@bharatagarwal6330
@bharatagarwal6330 6 жыл бұрын
classdef uiaxes < matlab.apps.AppBase % Properties that correspond to app components properties (Access = public) UIFigure matlab.ui.Figure STARTButton matlab.ui.control.Button FrequencyKnobLabel matlab.ui.control.Label FrequencyKnob matlab.ui.control.Knob THETASliderLabel matlab.ui.control.Label THETASlider matlab.ui.control.Slider AmplitudeSliderLabel matlab.ui.control.Label AmplitudeSlider matlab.ui.control.Slider UIAxes matlab.ui.control.UIAxes GaugeLabel matlab.ui.control.Label Gauge matlab.ui.control.SemicircularGauge end methods (Access = private) % Callback function: AmplitudeSlider, FrequencyKnob, % STARTButton, THETASlider function STARTButtonPushed(app, event) THETA=app.THETASlider.Value; freq=app.FrequencyKnob.Value; Ampl=app.AmplitudeSlider.Value; time=0:0.2:10; volt=Ampl*sin(freq*time+THETA); plot(app.UIAxes , time , volt); for i=1:length(volt) app.Gauge.Value=volt(i); pause(1); end end end % App initialization and construction methods (Access = private) % Create UIFigure and components function createComponents(app) % Create UIFigure app.UIFigure = uifigure; app.UIFigure.Position = [100 100 816 656]; app.UIFigure.Name = 'UI Figure'; % Create STARTButton app.STARTButton = uibutton(app.UIFigure, 'push'); app.STARTButton.ButtonPushedFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.STARTButton.Position = [359 64 100 22]; app.STARTButton.Text = 'START'; % Create FrequencyKnobLabel app.FrequencyKnobLabel = uilabel(app.UIFigure); app.FrequencyKnobLabel.HorizontalAlignment = 'center'; app.FrequencyKnobLabel.Position = [119 303 63 15]; app.FrequencyKnobLabel.Text = 'Frequency'; % Create FrequencyKnob app.FrequencyKnob = uiknob(app.UIFigure, 'continuous'); app.FrequencyKnob.Limits = [0 10]; app.FrequencyKnob.ValueChangedFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.FrequencyKnob.ValueChangingFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.FrequencyKnob.Position = [120 352 60 60]; app.FrequencyKnob.Value = 2; % Create THETASliderLabel app.THETASliderLabel = uilabel(app.UIFigure); app.THETASliderLabel.HorizontalAlignment = 'right'; app.THETASliderLabel.Position = [40 577 44 15]; app.THETASliderLabel.Text = 'THETA'; % Create THETASlider app.THETASlider = uislider(app.UIFigure); app.THETASlider.Limits = [-90 90]; app.THETASlider.ValueChangedFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.THETASlider.ValueChangingFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.THETASlider.Position = [105 583 150 3]; % Create AmplitudeSliderLabel app.AmplitudeSliderLabel = uilabel(app.UIFigure); app.AmplitudeSliderLabel.HorizontalAlignment = 'right'; app.AmplitudeSliderLabel.Position = [40 185 60 15]; app.AmplitudeSliderLabel.Text = 'Amplitude'; % Create AmplitudeSlider app.AmplitudeSlider = uislider(app.UIFigure); app.AmplitudeSlider.Limits = [0 20]; app.AmplitudeSlider.ValueChangedFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.AmplitudeSlider.ValueChangingFcn = createCallbackFcn(app, @STARTButtonPushed, true); app.AmplitudeSlider.Position = [121 191 150 3]; app.AmplitudeSlider.Value = 5; % Create UIAxes app.UIAxes = uiaxes(app.UIFigure); title(app.UIAxes, 'Title') xlabel(app.UIAxes, 'X') ylabel(app.UIAxes, 'Y') app.UIAxes.Position = [433 434 300 185]; % Create GaugeLabel app.GaugeLabel = uilabel(app.UIFigure); app.GaugeLabel.HorizontalAlignment = 'center'; app.GaugeLabel.Position = [523 282 42 15]; app.GaugeLabel.Text = 'Gauge'; % Create Gauge app.Gauge = uigauge(app.UIFigure, 'semicircular'); app.Gauge.Limits = [-20 20]; app.Gauge.Position = [484 312 120 65]; end end methods (Access = public) % Construct app function app = uiaxes % Create and configure components createComponents(app) % Register the app with App Designer registerApp(app, app.UIFigure) if nargout == 0 clear app end end % Code that executes before app deletion function delete(app) % Delete UIFigure when app is deleted delete(app.UIFigure) end end end
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
Your complete script looks good. And it runs on my machine correctly. So, now the only issues on your machine is due custom uiaxes.m or plot.m file which is over-shadowing the built-in function. Use below command which are your custom files and remove them from matlab path: which -all uiaxes which -all plot
@SaquibSattar007
@SaquibSattar007 6 жыл бұрын
can you make videos on using global functions in app design and A room has two doors, one dedicated for entry and other for exit. A PIR sensor is placed at both the doors to monitor the movement of the people. Write a MATLAB code to dynamically count the number of occupants in the room. Assume that PIR sensors are connected to digital pin 8 and 9 of Arduino Uno which are dedicated for entry and exit doors respectively . An LED is connected to digital pin 9 of Arduino Uno. A distance measuring analog sensor that generates 0 to 5V is connected to analog pin A0 of Arduino Uno. Write a MATLAB program to vary the flickering frequency of the LED depending on the position of any object from the sensor. Develop a user interface which consist of a static text and a button. On click of the button, the color of the static text should randomly change Thanks :)
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
I will be glad to help you out. Once I have some videos available as per your request, I will let you know.
@ProgrammerWorld
@ProgrammerWorld 6 жыл бұрын
I have made a video which may help you with your above requirements. You can watch it at: kzbin.info/www/bejne/bX_RZ3eOm9p4jtU
@Stefan-ef1vv
@Stefan-ef1vv 5 жыл бұрын
Can it update in real time?
@ProgrammerWorld
@ProgrammerWorld 5 жыл бұрын
Could you please elaborate on what you mean by real time? If you mean to stream live data using something like data acquisition toolbox, then yes I think it should be possible to plot those data in chunks of time interval. However, if you mean to update the plot while gui application is running, then yes that is also possible. I think that is shown in my various videos on Matlab app designer topic.
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 125 МЛН
Girl, dig gently, or it will leak out soon.#funny #cute #comedy
00:17
Funny daughter's daily life
Рет қаралды 34 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 51 МЛН
App Design in MATLAB
54:04
CES - MATLAB in the Middle East
Рет қаралды 20 М.
Demo: Creating a MATLAB App
23:27
DoctorBear
Рет қаралды 482
How to design a simple Game in MATLAB using App Designer?
18:49
Programmer World
Рет қаралды 27 М.
How to create your video editor App in MATLAB using App Designer?
43:38
Programmer World
Рет қаралды 2,7 М.
Building MATLAB Apps with App Designer
28:31
MATLAB
Рет қаралды 98 М.
How to Build a GUI in MATLAB using App Designer
10:26
MATLAB
Рет қаралды 191 М.
Passing Values in AppDesigner in Matlab
9:12
SnugglyHappyMathTime
Рет қаралды 10 М.
How to Plot Live Data from a Thermistor to MATLAB App Designer
9:43
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 125 МЛН