Share your Apps with MATLAB Online and Focused View: A Pumpkin Example
Guest Writer: Eric Ludlam Today Eric Ludlam shares three steps to share your app with others using a hyperlink. Eric is the development manager of MATLAB’s charting team and a returning contributor to the Graphics and App Building blog. See Eric's full bio on our contributors page. |
Over on the MathWorks LinkedIn, Facebook and Instagram feeds, we posted a link to a pumpkin designing app for people to try out for Halloween. It included this fun video showing how to use an app created with App Designer to create your own customized pumpkin.
The best part is it's easy to jump from a simple link in your browser to trying out the app using MATLAB Online. Here, give it a try:
While I happen to enjoy designing pumpkins in MATLAB, you probably have something different you're interested in and would like to share with your colleagues or friends. To that end, let's look at this new feature that showed up for MATLAB Online over the summer of 2024. These steps will let you create and share an app the same way we shared the pumpkin app.
Step 1: Build your App
Open up appdesigner and select the type of app you want to build. I used the "2-Panel App with Auto Reflow"
For simple concepts with a few parameters and a graphic, this type of app is useful because it handles figure resizes nicely, and it's easy to explore how modifying values in the UI can impact your data visualization.
For more on building Apps in App Designer, try these tutorials:
Step 2: Upload to GitHub
If you don't have an account on GitHub, you can create one for free and create your first repository.
If you aren't familiar with using GitHub and MATLAB, you can check out this short tutorial.
Step 3: Add an Open in MATLAB Online button to your README
Once you have an app you want to share, you can visit "Open in MATLAB Online from GitHub" doc page to create your own link!
I added a RED box around the "File path" - this can be your app designer app, OR it can be a Live script that will be opened so the person who clicks the link can start interacting with your content right away.
I added an ORANGE box around the "Open in Focused view" toggle. When toggled on, the app or live script will fill the browser when opened, providing a full-screen experience for your content. If you leave this toggle unchecked, then the app will open in a window in MATLAB Online. This is handy if you want the person who clicked the link to easily explore the underlying code, build off it, and collaborate with the MATLAB Desktop.
Once you've created your links, you can paste the URL into an email, or paste the markdown into your README.md, and you'll get a button that will let visitors to your GitHub page open your app directly in MATLAB Online to try it out.
Your button will look like this. To try out my pumpkin app give it a click to see what the workflow is like.
I turned on the "Focused View" toggle when making my link, so if you clicked the above link your view will look like this, filling the whole browser page. Your users will still get a button in the corner (circled) to access the desktop if they need it.
For more on focused view:
Share your favorite pumpkin, or App / Live Script via this functionality in the comments below!
- カテゴリ:
- App Building,
- Demos,
- New Features
コメント
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。