DoctorBear
DoctorBear
  • 162
  • 309 607
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
Переглядів: 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
Circuit Theory: Combining Inductors
Переглядів 39Рік тому
Circuit Theory: Combining Inductors
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: Paralllel Capacitances
Переглядів 8Рік тому
Circuit Theory: Paralllel Capacitances
Circuit Theory: Steady-state Circuit Analysis with Capacitors
Переглядів 201Рік тому
Circuit Theory: Steady-state Circuit Analysis with Capacitors
Circuit Theory: Series Capacitors
Переглядів 19Рік тому
Circuit Theory: Series 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

КОМЕНТАРІ

  • @bestmiles
    @bestmiles 26 днів тому

    Thank you

  • @prithvinayak8443
    @prithvinayak8443 Місяць тому

    Thank you very much!

  • @vadrif-draco
    @vadrif-draco Місяць тому

    Very nice. Is there any way to customize how this PDF looks like? At the very least, its orientation for example.

  • @Prasad-pn8wk
    @Prasad-pn8wk 2 місяці тому

    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.

    • @doctorbear4505
      @doctorbear4505 Місяць тому

      Have you tried installing pandoc?

    • @Prasad-pn8wk
      @Prasad-pn8wk Місяць тому

      @@doctorbear4505 nbconvert failed: xelatex not found on PATH, There was an issue with the installation. resolved it, Thanks for you help!!

    • @cocaflores
      @cocaflores 11 днів тому

      @@Prasad-pn8wk Same issue here. How did you solve it?

  • @rubencroall8817
    @rubencroall8817 2 місяці тому

    Exactly what I was looking for! Thank you!

  • @elijahlazarus4639
    @elijahlazarus4639 3 місяці тому

    Very nice

  • @MustafaLaithJaafer
    @MustafaLaithJaafer 4 місяці тому

    thanks. may I ask about the name of the software you're using? and maybe you can suggest the best software...

  • @phiggs
    @phiggs 4 місяці тому

    Thank you! This is exactly what I was looking for.

    • @doctorbear4505
      @doctorbear4505 4 місяці тому

      I'm really glad to provide some helpful content!

  • @theoryandapplication7197
    @theoryandapplication7197 4 місяці тому

    thank you

  • @mathkaveli11
    @mathkaveli11 4 місяці тому

    A quick and clear explanation. Thank you

  • @nicholasseifert4072
    @nicholasseifert4072 4 місяці тому

    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.

    • @doctorbear4505
      @doctorbear4505 4 місяці тому

      You may also like this Python package. schemdraw.readthedocs.io/en/stable/

  • @the7door385
    @the7door385 5 місяців тому

    hello dr, can you give me some help in simulating my Hamiltonian in Matlab?

  • @soniyaraju1138
    @soniyaraju1138 5 місяців тому

    how to make the circuit in full page width rather than column with in ieee

  • @Maxi_2601
    @Maxi_2601 6 місяців тому

    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.

  • @durlov5
    @durlov5 6 місяців тому

    Good video, but your volume is very low, can you increase that next time? Thanks!

  • @TomasApolonia
    @TomasApolonia 6 місяців тому

    Thank you. Best video I've found to explain the derivation.

    • @doctorbear4505
      @doctorbear4505 6 місяців тому

      Thank you! I appreciate your feedback.

  • @arashyusefi1889
    @arashyusefi1889 6 місяців тому

    Thanks 🙏👍💯😊

  • @kanki8300
    @kanki8300 7 місяців тому

    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?

    • @doctorbear4505
      @doctorbear4505 7 місяців тому

      I suggest starting here: www.mathworks.com/matlabcentral/discussions/highlights/132556-new-in-r2020a-mouse-pointer-control-in-apps-uifigures

  • @user-ik6pv2nu3h
    @user-ik6pv2nu3h 7 місяців тому

    great

  •  7 місяців тому

    Ol mi yoksa esnek bir

  • @kubatyszko807
    @kubatyszko807 8 місяців тому

    Nice tutorial, I only have one tiny nitpick - literate programming wasn't coined by Linus Torvalds, but Donald Knuth.

  • @sujaldev
    @sujaldev 8 місяців тому

    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.

  • @fhdjdjjshdbvdbbz9970
    @fhdjdjjshdbvdbbz9970 9 місяців тому

    Que buen video, muchas gracias.

  • @user-hg5sn7jb9b
    @user-hg5sn7jb9b 10 місяців тому

    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.

  • @sajjadveisi7663
    @sajjadveisi7663 Рік тому

    Doctor bear, keep up the helpful vids. Good job.

  • @woodychelton5590
    @woodychelton5590 Рік тому

    so can we not use this when voltage sources are in the circuit?

  • @Sheik41
    @Sheik41 Рік тому

    Hai doctor,how to type my native local language tamil and hindhi (both are Indian languages) in LYX ,pls guide man.

    • @doctorbear4505
      @doctorbear4505 Рік тому

      This is the best thing I know of at this time. tex.stackexchange.com/questions/319/latex-xetex-setup-tamil-indic-languages

  • @szymonmazur5029
    @szymonmazur5029 Рік тому

    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?

  • @Rockyzach88
    @Rockyzach88 Рік тому

    Thanks for the video. Also a Navy vet here. Trying to see if I'm interested in QCA. (Discovered through chatgpt4)

  • @ghnbtrcv8672
    @ghnbtrcv8672 Рік тому

    13:30 margins

  • @shameer339
    @shameer339 Рік тому

    Good explanation.Thank You

  • @shalinijesus234
    @shalinijesus234 Рік тому

    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?

  • @MohamedElheddad
    @MohamedElheddad Рік тому

    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.

    • @doctorbear4505
      @doctorbear4505 Рік тому

      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.

  • @vtrandal
    @vtrandal Рік тому

    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.

  • @goutamidas7427
    @goutamidas7427 Рік тому

    Sir, .eps graphic is not opening, what to do?

    • @doctorbear4505
      @doctorbear4505 Рік тому

      Maybe use jpeg instead? EPS is good for LaTeX

  • @antonpozdeev6370
    @antonpozdeev6370 Рік тому

    Dear Dr. Bear, thank you, it's understandable and very helpful

  • @feliznavidad1114
    @feliznavidad1114 Рік тому

    legend

  • @evrik78
    @evrik78 Рік тому

    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.

  • @vaisakhkm783
    @vaisakhkm783 Рік тому

    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

  • @victorg.5011
    @victorg.5011 Рік тому

    clears up my question

  • @leonardorossi4943
    @leonardorossi4943 Рік тому

    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?

    • @doctorbear4505
      @doctorbear4505 Рік тому

      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.

    • @leonardorossi4943
      @leonardorossi4943 Рік тому

      @@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.

  • @0451Deus
    @0451Deus Рік тому

    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!

  • @JakeWest-ju4ms
    @JakeWest-ju4ms Рік тому

    Thank you! This was very clear and concise. I will be using your videos while I take my circuits course.

  • @haipengli4769
    @haipengli4769 Рік тому

    Great demo 🎉

  • @davomo89
    @davomo89 Рік тому

    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!

    • @doctorbear4505
      @doctorbear4505 Рік тому

      Thanks for your comment. Glad I could help!

  • @vinitpandya02
    @vinitpandya02 Рік тому

    where code

  • @salsa0215
    @salsa0215 Рік тому

    Thank you! If the Problem still, try a=arduino ('portwhereisyourArduino', 'name of your arduino')

  • @amulyak5592
    @amulyak5592 Рік тому

    You are doing great. Keep it up.

  • @johnreysandoval6083
    @johnreysandoval6083 Рік тому

    TABANG KOL!