- 162
- 309 607
DoctorBear
United States
Приєднався 16 жов 2015
Demo: Creating a MATLAB App
This is an introduction to making MATLAB applications (apps). These are interactive apps that let you get instantaneous feedback when studying complex systems.
The overview is as follows:
1. (Optional) Start with a script that does a simple calculation and
plotting.
a. You don't have to do this, but it's wise to make sure that you
have a good workflow before your integrate it with an app.
2. Make a new MATLAB App (also known as a graphical user interface,
or GUI).
3. Add UI elements (axes, sliders, edit fields, etc.)
4. Add a function to the app that serves as a calculational
engine. This is generally an adaptation of your
previously-developed and previously-tested workflow from step 1.
5. Add a callback for each interactive element
6. Each callback should invoke the calculational engine
a. The calculational engine must extract values from the UI
elements using the syntax app.SomeUIElement.Value
Additionally, if there are other variables you want to pass back and
forth to different app elements, you can embed these in the app
properties (not discussed in this video). This is like having access
to a global variable.
Get the code here: github.com/enriquepacis/MATLABAppsDemo
Related videos:
Overview of the QCA Concept - ua-cam.com/video/z8LBOpfYcgY/v-deo.html
Introduction to MATLAB and LiveScripting - ua-cam.com/video/tNcSpyCa6bc/v-deo.html
Creating Publication-quality Plots in MATLAB - ua-cam.com/video/fF5dautaUfI/v-deo.html
10 - Basic MATLAB Functions - ua-cam.com/video/y0KX8bAGX6M/v-deo.html
The overview is as follows:
1. (Optional) Start with a script that does a simple calculation and
plotting.
a. You don't have to do this, but it's wise to make sure that you
have a good workflow before your integrate it with an app.
2. Make a new MATLAB App (also known as a graphical user interface,
or GUI).
3. Add UI elements (axes, sliders, edit fields, etc.)
4. Add a function to the app that serves as a calculational
engine. This is generally an adaptation of your
previously-developed and previously-tested workflow from step 1.
5. Add a callback for each interactive element
6. Each callback should invoke the calculational engine
a. The calculational engine must extract values from the UI
elements using the syntax app.SomeUIElement.Value
Additionally, if there are other variables you want to pass back and
forth to different app elements, you can embed these in the app
properties (not discussed in this video). This is like having access
to a global variable.
Get the code here: github.com/enriquepacis/MATLABAppsDemo
Related videos:
Overview of the QCA Concept - ua-cam.com/video/z8LBOpfYcgY/v-deo.html
Introduction to MATLAB and LiveScripting - ua-cam.com/video/tNcSpyCa6bc/v-deo.html
Creating Publication-quality Plots in MATLAB - ua-cam.com/video/fF5dautaUfI/v-deo.html
10 - Basic MATLAB Functions - ua-cam.com/video/y0KX8bAGX6M/v-deo.html
Переглядів: 326
Відео
Launch Jupyter and Start Coding!
Переглядів 1015 місяців тому
I show two ways to get started coding. From Mac or PC, you can launch Jupyter Lab from Anaconda Navigator. On a Mac, you can also start Jupyter Lab from the Terminal by typing “juptyer lab.” This allows you to bypass Anaconda Launcher. Equivalently, on PC, you start the Anaconda PowerShell, and just as in a Mac/Linux Terminal, you can type “jupyter lab”. Once you get Jupyter Lab going, you can ...
Jupyter Lab: Exporting a notebook as a PDF
Переглядів 5 тис.5 місяців тому
I demonstrate how to convert a Jupyter notebook to a PDF on Mac or PC. This is called “exporting” or “publishing”. Mac users: you may need to install the pandoc package. You'll see I didn't have it! I figured it's worth sharing my failure if it helps you succeed! 0:00 - Start 0:39 - Navigate the file space in Jupyter Lab 1:09 - Open a notebook in Jupyter Lab 1:15 - PC - convert notebook to PDF ...
Customizing Python in Anaconda - Environments and Package Installation
Переглядів 1255 місяців тому
I show how to create environments in conda. Then, we add a package (specifically, Qiskit) to the environments on a Mac and on a PC. Sometimes, packages require a specific version of Python. On Mac, use Terminal or iTerm2. On PC, use PowerShell. Note on Qiskit: at this time, I suggest an environment that uses Python 3.10 (yes, you can get Python up to 3.12 in Anaconda, but I think 3.10 works the...
Install Python on Mac or PC (for FREE)
Переглядів 485 місяців тому
Install Python on Mac or PC I show how to install Python on Mac or PC. I recommend the Anaconda distribution, since it “ships” with lots of packages used for scientific and mathematical research and applications. We'll install Anaconda in this video, and we'll show you how to launch the Anaconda Navigator. Links Download Anaconda - www.anaconda.com/download Mac Command-line Installation - docs....
Complex Numbers in DigitalEd's Möbius
Переглядів 676 місяців тому
Here, I give a video to guide students (especially my students) in entering complex numbers in Möbius assignments. 0:00 - Start 0:40 - Symbolic vs Text Entry 1:36 - Progress check with "How did I do?" 1:55 - Equivalent mathematical forms 2:36 - Entry of Complex Numbers: use Capital "I" 4:35 - Summary of Möbius tips 5:30 - Möbius vs Canvas
MATLAB + Arudino: Joystick Control over Graphics
Переглядів 3097 місяців тому
I demonstrate how to control the position of a MATLAB graphical object using an Arduino joystick. I use a very methodical approach, building and testing as I go along. Here, the approach is to use the joystick to specify an increment (dx and dy) for the x and y coordinates of the patch vertices. We also use logical statements to constrain the movement within limits, which we can specify. I also...
MATLAB: Vectorized Distance Calculation to an Array of Opponents
Переглядів 587 місяців тому
I demonstrate vectorized calculations of distances between a point of interest and an array of other points. This could be used in calculating the distance between a player’s avatar and obstacles or opponents in a game. MATLAB has some useful functions. We can avoid a (slow) FOR loop by using vectorized calculations. We simply perform array operations and apply functions to the entire array. He...
MATLAB: Data Analysis - min() and max() Demo
Переглядів 1108 місяців тому
Here, I demonstrate how to use the min() and max() functions in MATLAB for data analysis. Not only can they help you ind the minimum and the maximum, but they can also help you find the index to the minimum and maximum values in a vector.
Arduino + MATLAB on Mac: Find your Arduino Port
Переглядів 3758 місяців тому
Here, I demonstrate three ways to find your Arduino port on a Mac: 1. Let MATLAB autodetect it in a LiveScript. 2. Find it manually in the Terminal app 3. Find it programmatically in MATLAB
MATLAB Graphics: Animated Patch
Переглядів 3078 місяців тому
One of the easiest ways to animate an object in MATLAB is to modify its properties. Graphics objects (Line, Patch, etc.) have XData, YData, and ZData. You can directly modify these properties in loop (WHILE or FOR) to change the graphic over time, resulting in animation. This may be preferable to redrawing the entire figure. For interactive animation (say, response to a joystick), allow the inc...
Introduction to Circuit Analysis in AC Steady State - Part 02 - Basic Example
Переглядів 149Рік тому
This follows a video in which I introduce the analysis of a circuit in ac steady state (ua-cam.com/video/ERBiz5JLfYg/v-deo.html). If you haven’t seen it yet, I recommend watching it for helpful context to this video. This video simply solves a circuit using the method outlined previously. I also take the time to visualize the time-domain signals in the circuit. Related videos: 1. Obtaining a se...
Circuit Theory: Deriving a Second-order ODE for a Series RLC Circuit
Переглядів 390Рік тому
I show how a series RLC circuit with two energy storage elements gives rise to a second-order differential equation. Related videos: 1. Solving a second-order differential equation - ua-cam.com/video/JK_kPbIJIp4/v-deo.html 2. ac Steady-state Circuit Analysis - ua-cam.com/video/ERBiz5JLfYg/v-deo.html
Circuit Theory: First-order RL Circuits (basic)
Переглядів 184Рік тому
I discuss an overall strategy for handling first-order RL circuits. It is simple: find the initial condition, final condition, and connect the two using an exponential. I do a very simple example where I find initial and final conditions for inductor current, iL(t), i.e., at t=0 and t=infinity. I do some very simple circuit analysis to determine the time constant for an exponential decay that c...
Circuit Theory: Steady-state Circuit Analysis with Resistors, Inductors, and Capacitors
Переглядів 1,1 тис.Рік тому
Here, I illustrate the basic principles of dc steady-state circuit analysis. We do a simple circuit with one R, one L, and one C. 0:00 - Start 1:00 - Principles for steady-state analysis
Install MATLAB Add-on for Arduino - MATLAB 2022a + Arduino UNO + Mac
Переглядів 2 тис.Рік тому
Install MATLAB Add-on for Arduino - MATLAB 2022a Arduino UNO Mac
Circuit Theory - Capacitive Voltage, Current, Power, and Energy Relationships
Переглядів 49Рік тому
Circuit Theory - Capacitive Voltage, Current, Power, and Energy Relationships
Circuit Theory: Steady-state Circuit Analysis with Capacitors
Переглядів 2,3 тис.Рік тому
Circuit Theory: Steady-state Circuit Analysis with Capacitors
Circuit Theory: Introduction to Capacitance
Переглядів 87Рік тому
Circuit Theory: Introduction to Capacitance
Circuit Theory: Steady-state Circuit Analysis with Capacitors
Переглядів 201Рік тому
Circuit Theory: Steady-state Circuit Analysis with Capacitors
Circuit Theory: Inverting Amplifier Circuit Example
Переглядів 68Рік тому
Circuit Theory: Inverting Amplifier Circuit Example
Circuit Theory: Ideal Op Amp Circuits (basic)
Переглядів 538Рік тому
Circuit Theory: Ideal Op Amp Circuits (basic)
Circuit Theory - Ideal Op Amp Assumptions
Переглядів 571Рік тому
Circuit Theory - Ideal Op Amp Assumptions
Circuit Theory: Maximum Power Transfer (DC)
Переглядів 6Рік тому
Circuit Theory: Maximum Power Transfer (DC)
Circuit Theory: Thévenin and Norton Equivalence
Переглядів 25Рік тому
Circuit Theory: Thévenin and Norton Equivalence
Circuit Theory: the Superposition Principle
Переглядів 103Рік тому
Circuit Theory: the Superposition Principle
Electric Circuits: Mesh-current Analysis by Inspection
Переглядів 161Рік тому
Electric Circuits: Mesh-current Analysis by Inspection
Thank you
Thank you very much!
Very nice. Is there any way to customize how this PDF looks like? At the very least, its orientation for example.
Thanks for sharing the information. But looks this feaure is not availble now I'm getting Error: 500 : Internal Server Error nbconvert failed: Pandoc wasn't found.
Have you tried installing pandoc?
@@doctorbear4505 nbconvert failed: xelatex not found on PATH, There was an issue with the installation. resolved it, Thanks for you help!!
@@Prasad-pn8wk Same issue here. How did you solve it?
Exactly what I was looking for! Thank you!
Very nice
thanks. may I ask about the name of the software you're using? and maybe you can suggest the best software...
Thank you! This is exactly what I was looking for.
I'm really glad to provide some helpful content!
thank you
A quick and clear explanation. Thank you
Thank you for the video! In the materials that I write it's really difficult to find a good and free software for this purpose of drawing circuits. This library may help me a lot.
You may also like this Python package. schemdraw.readthedocs.io/en/stable/
hello dr, can you give me some help in simulating my Hamiltonian in Matlab?
how to make the circuit in full page width rather than column with in ieee
I just started using org to speed my latex workflow and so far i'm loving it. Thank you for this demo it was really quick and informative.
Good video, but your volume is very low, can you increase that next time? Thanks!
Thank you. Best video I've found to explain the derivation.
Thank you! I appreciate your feedback.
Thanks 🙏👍💯😊
hello! i had a question that is a bit unrelated but would you know how i could create a custom mouse cursor/pointer in matlab app designer?
I suggest starting here: www.mathworks.com/matlabcentral/discussions/highlights/132556-new-in-r2020a-mouse-pointer-control-in-apps-uifigures
great
Ol mi yoksa esnek bir
Nice tutorial, I only have one tiny nitpick - literate programming wasn't coined by Linus Torvalds, but Donald Knuth.
The constant switching between the program and the output is very disorienting and it's probably a lot of editing effort for you, I think just showing the full screen would be better.
Que buen video, muchas gracias.
Tell me how to make an animation of the flight path of a satellite. I have a set of data - coordinates in the form of a list {x,y}, how to make an animation of the satellite's movement? Only the object of movement should be visible.
Doctor bear, keep up the helpful vids. Good job.
so can we not use this when voltage sources are in the circuit?
Hai doctor,how to type my native local language tamil and hindhi (both are Indian languages) in LYX ,pls guide man.
This is the best thing I know of at this time. tex.stackexchange.com/questions/319/latex-xetex-setup-tamil-indic-languages
What if I wanted to add a label to one side of the component, such as a resistor with label R_1, and the SI unit value on the other side of the component?
Thanks for the video. Also a Navy vet here. Trying to see if I'm interested in QCA. (Discovered through chatgpt4)
13:30 margins
Good explanation.Thank You
I have installed simulink support package for arduino hardware,but during hardware setup, download tests fails saying that laptop port and arduino board was not connected.I have tried installing drivers and compiler but still connection was not established between port and the board. What should I do?
Can you guide me on how to export the table from an Excel file (CSV or XML)? because I using STATA to output a very big table.
Typically, I make a Python or MATLAB script to make a table in a separate *.tex file. Then you can include the file in the LyX document.
Sadly, much of this does not work well with Mathamatica Online version which eliminates most people from using it who cannot afford the license fee of the desktop version.
Sir, .eps graphic is not opening, what to do?
Maybe use jpeg instead? EPS is good for LaTeX
Dear Dr. Bear, thank you, it's understandable and very helpful
legend
Before watching this video I was asking life to give me a sign with a quantum-mechanics significance. Life answered me and sent me this video.
I was highly doubtful of switching to emacs, because everyone was showing emacs can replace a todo app, which is good, but something i already does.... But you conviced me to switch to emacs.... writing notes in vim and neovim wasn't a great experince, due to bad images support, so i was using obsidean, but that sucked because i cannot what i write like in vim :!python thanks
clears up my question
Thanks for the helpful video. However, when exporting an html document, my equations don't render: I just see e.g. $F = ma$ instead of how it should look like. By any chance, do you know what could be the problem?
In Emacs org mode, I use \(F = ma\). I typically avoid the "$" delimiter. This works nicely in LaTeX export and in HTML. For display equations, see 3:31. Good luck. Let me know if that isn't helpful.
@@doctorbear4505 It just shows \(F = ma\), and same thing for the display equations. Could it be that I need to have some version of mathjax or something like that? Thank you anyway. Edit: I was using Aquamacs; i tried another version of emacs and now it works. I don't know what could be different.
Honestly a great explanation, very concise. Hope you make more videos in the near future because as an EE student, they'd be extremely helpful. Thanks!
Thank you! This was very clear and concise. I will be using your videos while I take my circuits course.
Best of luck!
Great demo 🎉
I learned more from you about Mathematica in the first 7 minutes of this video than I have in the last few semesters. Where have you been my entire college life?!?🙃 Thank you a thousand thank yous!
Thanks for your comment. Glad I could help!
where code
Thank you! If the Problem still, try a=arduino ('portwhereisyourArduino', 'name of your arduino')
You are doing great. Keep it up.
TABANG KOL!