Saturday, February 4, 2023

MATLAB Tip Calculator on Your Phone

In this video I show how to take your MATLAB code and run it on your iPhone. 

Here's a list of instructions you can use while watching the video.

In MATLAB on Your Computer

  • Create a MATLAB script or function.
  • Document your code by adding explanatory comments at the beginning of the file and within each section.
  • Publish the code. On the Publish tab, click Publish.
    • By default, MATLAB creates a subfolder named html, which contains an HTML file and files for each graphic that your code creates. The HTML file includes the code, formatted comments, and output. Alternatively, you can publish to other formats, such as PDF files or Microsoft PowerPoint® presentations. For more information on publishing to other formats, see Specify Output File.
    • In MATLAB Online™, to allow MATLAB to open output windows automatically when publishing, enable pop-up windows in your Web browser.

  • After publishing the code, you must share the folder containing the published files. For more information, see Share Folders in MATLAB.

  • To save to the MATLAB Drive, in MATLAB select Publish -> Save -> Save As -> navigate to MATLAB-Drive and save tipcalculator.m there.
On Your Phone
  • Install the MATLAB app on your phone, login to your account and access the script saved in to cloud. You must have internet access to access.
  • Impress your family and friends with your tip knowledge, skills and abilities!
And if you want to also impress them a little more, here's how to mirror your iPhone screen on a Mac.
  1. Connect your iPhone to your Mac with a USB cable.
  2. Open the QuickTime Player on your Mac.
  3. Click “File”, and choose “New Movie Recording”.
  4. Click the Options pop-up menu, then Choose Your Connected iPhone. ...
  5. The iPhone screen will now instantly display on the Mac.