Highlights
Segui


AMA: The secret of staff contributors in the Answers forum

Adam Danz il 24 Apr 2024 (Modificato il 24 Apr 2024)
Ultime attività Modificato da Solange il 27 Giu 2024

Welcome to MATLAB Central's first Ask Me Anything (AMA) session! Over the next few weeks, I look forward to addressing any questions or curiosities you might have about MATLAB, the forum, sasquatches, or whatever's on your mind. Having volunteered as a contributor to this community before joining MathWorks, I'm excited to act as a bridge between these two worlds. Let's kick things off by sharing a little-known fact about the forum’s staff contributors!
A couple of years ago, before I joined MathWorks as a developer on the Graphics and Charting team, I often wondered who were the MathWorkers with the [staff] moniker answering questions in the Answers forum. Is their MATLAB Central activity part of their day-to-day job expectations? Do they serve specific roles on some kind of community outreach team? Is their work in the forum voluntary in the same way that non-staff contributors volunteer their time?
Now that I'm on the inside, I'd like to share a secret with my fellow MATLAB users and MATLAB Central enthusiasts: with the exception of the MathWorks Support Team, staff participation in the Answers forum is completely voluntary! The staff contributions you see in the forum arise from pure intrinsic motivation to connect with users, help people out of ruts, and spread the word about our product!
For example, Steven Lord has contributed 20-150 answers per month for 9 years! Steven is a quality engineer for core MATLAB numerical functions. Cris LaPierre develops training material and has been a faithful contributor in the forum for almost 6 years! Kojiro Saito and Akira Agata have been tackling Japanese content for more than 7 years! There are many others who have inspired me as a user, and I am honored to now call colleagues: Peter Perkins, Michio, Joss Knight, Alan Weiss, Jiro Doke, Edric Ellis, and many others who deserve appreciation.
The forum's success hinges on the invaluable contributions from the majority of non-staff volunteers, whose dedication and expertise fuel our community. But I know I wasn't alone in wondering about these staff contributors, so now you're in on the secret!
I'm curious to know what other topics you're interested in learning about. Ask me anything!
Solange
Solange il 27 Giu 2024 (Modificato il 27 Giu 2024)
Hello! I'm starting to work with Matlab and I need help importing EDF files (or EFD in your language) generated in icelera nano into matlab using EEGlab, could anyone help me? If possible, step by step!
Adam Danz
Adam Danz il 9 Maggio 2024
Thank you all for the engaging and insightful questions during our first AMA session! Your questions gave me the opportunity to dig deeper into several topics. For those of you particularly interested in MATLAB Graphics and App Building, I highly recommend following our new blog for the latest insights, tips, and updates. I look forward to seeing you in the Answers forum or File Exchange!
KATHIRVEL
KATHIRVEL il 9 Maggio 2024
I generated code with the help of Simulink coder. I don't have Embedded coder, so I used that, Integrate Simulink coder with other code is possible?
Adam Danz
Adam Danz il 9 Maggio 2024
Andrei-Calin
Andrei-Calin il 1 Maggio 2024
I want to purchase a licence for home use just to learn matlab.It is enough a laptop with a procesor intel core ultra 5 125u/125h with iGPU up to 64GB or I need something with a dGPU?
Thank you in advance for your time.
Adam Danz
Adam Danz il 9 Maggio 2024
Walter Roberson
Walter Roberson il 1 Maggio 2024
The iGPU and dGPU will not be actively used by MATLAB; they will only be used indirectly by the graphics drivers.
MATLAB is only able to actively use NVIDIA GPUs.
Adam Danz
Adam Danz il 30 Apr 2024
Addressing more questions this week! Keep the questions coming!
Abdul
Abdul il 29 Apr 2024
power factor improvement using thyrister switched capaciotor simple circuit in matlab simulink
Eric Delgado
Eric Delgado il 26 Apr 2024
"Ask me anything"? Oh my God! Amazing. So... I can not run away from my current problems.
  • When compiling an app written in AppDesigner, I notice that the desktop version of the app (supported by Matlab Runtime) performs as well as when run in the Matlab IDE itself. On the other hand, the webapp version of the app (supported by Matlab WebServer+Runtime) performs much worse than the desktop version. What's the main reason here? Is it the browser?
  • In the configuration of the Matlab WebServer, I can keep a number of Matlab Runtime instances pre-loaded in RAM. Even so, the startup time for a webapp is longer than the startup time of the app if loaded directly in the Matlab IDE. Why is this the case?
  • Do you think that installing the Matlab WebServer and the supporting Runtime versions on a RAM disk would mitigate those issues and enhance the usability of webapps? Have you ever tried an approach like this?
Adam Danz
Adam Danz il 9 Maggio 2024
@Eric Delgado thank you for the question! You're not alone in recognizing the difference in performance between desktop and webapp versions. Deployment architecture stretches beyond my expertise so I've reached out to a colleague to get a better understanding.
The root of the performance difference you've described could stem from several factors. One potential cause might be related to the initial session startup or the compilation performance.
We employ "prewarming" to expedite the startup of MATLAB Runtime instances, though it's important to note that startup time can also depend on the specifics of your application, including its startup function.
Another critical factor is the server's available memory. For system requirements, see documentation.
Browser performance also plays a role, typically adding a 10-20% overhead compared to running directly in MATLAB. Additionally, deploying webapps on public cloud services like AWS or Azure introduces network latency, which can impact throughput and, by extension, the runtime performance of your app.
Regarding your question about utilizing a RAM disk to host the MATLAB WebServer and Runtime, it's an interesting idea. It may offer a small improvement. We already utilize caching for static content files, which would benefit subsequent sessions following the first startup.
If you're experiencing unusual delays in webapps over desktop performance, it might be worth examining your setup more closely for potential optimizations. I recommend reaching out to our tech support for more help.
okolo
okolo il 26 Apr 2024
hope i am welcomed @ All thanks
Adam Danz
Adam Danz il 9 Maggio 2024
Always (unless you're a bot).
Image Analyst
Image Analyst il 25 Apr 2024
Adam, I'm planning on seeing the new quirky movie out now called "Sasquatch Sunset". Though very different from any other movies, it got a good review from our local TV critic.
So by question is you were already a heavy contributor to the Answers community so did Mathworks approach you to join the company, or did you apply to them (via an existing job opening)?
Adam Danz
Adam Danz il 1 Maggio 2024
"Sasquatch Sunset" sounds fun!
There were two primates who were primarily responsible for my transition from graduate school to MathWorks.
The first was a rhesus macaque monkey named Skippy. I worked with several monkeys in the neurophysiology lab, but Skippy was the most reliable. In order to study vision within the framework of a control system, I taught a couple of monkeys to use a joystick to steer through a virtual 3D environment. Skippy enthusiastically performed quite well for hours on end, providing me with short blocks of time between occasional interventions. I controlled the 4-5 hour experiment from an adjacent room 5 days a week, and as long as Skippy stayed on task, I would have many 5-15 minute blocks of time between interventions. This wasn't enough time to get deep into another project, but it was the perfect amount of time to expand my breadth of MATLAB exposure and engage with the MATLAB community by answering questions in MATLAB Central's Answers forum. Training and data collection took several years. Here's a histogram of my Answers contributions. Who can guess when that time period was?
The second primate I have to thank is a human, Loren Shure, who has been at MathWorks from the beginning and recently retired. As I was approaching the end of my PhD, Loren reached out to me, curious about what my post-graduate plans were.
The key takeaway from my experience, I believe, is the value of engaging with what you are passionate about. Whether it leads to unexpected career opportunities or simply enriches your personal and professional growth, genuine engagement is always rewarding and may even lead you to that 'sasquatch sunset'!
Here's a small statue of Skippy I keep on my desk in appreciation. I couldn't find a statue of Loren.
Steven Lord
Steven Lord il 25 Apr 2024
Thanks for shouting me out in the post, Adam! But your time line is a little off. I've been participating in "the Answers forum" before it was MATLAB Answers, sort of :)
In addition to my role as a quality engineer for the core mathematical functions, as a MATLAB expert I also work with other teams to design review new features they're proposing to be included in MATLAB. My reading and posting in MATLAB Answers (and in the MATLAB newsgroup before we introduced Answers, going back to the start of my MathWorks tenure in 2001) have proven invaluable in reviewing these features as I find it helps me more easily assess those features from a user's perspective rather than (or in addition to) a developer's perspective.
So while I answer questions to help people learn and use MATLAB, I also learn from the problems they've encountered and the mental models about how they think MATLAB works and use that information to try to help the users' models and the developers' models align.
Adam Danz
Adam Danz il 9 Maggio 2024
👆Steven qualified my post and found a bug😀
The last paragraph in Steven's response highlights one of Steven's greatest values to the company, IMO.
goc3
goc3 il 25 Apr 2024
Which of your contributions to File Exchange are you most proud of and why?
Adam Danz
Adam Danz il 30 Apr 2024
Easily participating in the File Exchange (FEX) is one of the things I miss most about being an outsider (my files). I haven't thought of this question before so it's difficult to pin point one function and explain why I'm proud of it. Having four of my submissions recognized as the "Pick of the Week" by the MATLAB community was certainly a highlight. However, my true source of pride comes from users' feedback who found my contributions helpful in overcoming their challenges. That moment of providing relief to someone stuck on a problem is incredibly rewarding.
If I had to highlight one function, it would be getContourLineCoordinates. Despite its name, which is not align with MATLAB's naming conventions, it serves a practical purpose. It simplifies the process of extracting contour line coordinates from a contour graphics object or a contour matrix, offering a straightforward solution to what can be a complex task. This function embodies what I love about contributing to FEX: making complex tasks more accessible to the community.
labelpoints, a function that adds text labels to axes, deserves an honorable mention for its utility in data visualization, though I'm looking forward to refining it further.
And since we're delving into graphics, craters is another contribution I'm particularly fond of, particularly the math involved.
Addressing the contributions I'm least proud of might have been an easier question to answer 😁
Deepu
Deepu il 25 Apr 2024
This is a fantastic insight into the contributions of staff members in the MATLAB Central Answers forum! It's inspiring to see how much dedication and passion they bring to supporting the community.
Since you're open to questions on various topics, here's one: Could you share some tips or best practices for effective troubleshooting in MATLAB, especially for beginners who might encounter challenges while coding or using MATLAB functions?
Also, I'm interested in hearing more about any upcoming developments or features in MATLAB that users can look forward to. Are there any exciting updates on the horizon that you can share with us?
Adam Danz
Adam Danz il 30 Apr 2024
Thanks for the great questions @Deepu!
Tips for Effective Troubleshooting in MATLAB:
Learning to use MATLAB's debugging tools is essential for troubleshooting. If you haven't explored these tools yet, I promise it will be a game changer. A fundamental task to get started is to place a breakpoint near the top of the problematic file and then execute the code that calls that file. Step through the code, explore variable values either by hovering over variables or from the command window. It's crucial to gain a clear understanding of what each line does, including the functions being called and their inputs. Pay attention to the path your code takes, noting if certain sections are bypassed or executed multiple times
However, stepping through code isn't always the best practice, especially in graphics during an update traversal (search for "Attempt to modify the tree during an update traversal" for context). In this case, more sophisticated debugging technics are valuable such as the use of print statements in combination with conditional break points - I just shared this tip about a week ago in the Tips and Tricks discussion channel. The next best step is learning to use print statements embedded in your code (fprintf, disp) -- but don't forget to remove those lines or comment them out!
Resources:
Upcoming Developments and Features in MATLAB:
Moving on to one of my favorite topics: discoverability. How do users discover new features? The nerdiest of us read the release notes following every release but it's easy to overlook a feature that isn't immediately useful to you but that you might need next month. I often revisit documentation pages. Take the max() function, for example. It might seem straightforward enough to bypass its doc page, but did you know that at least four new features have been added to max in the past six releases? For a review of recent new features pertaining to a particular function, scroll to the"Version History" section at the bottom of the doc page. Just below that, the "See Also" links are a goldmine for discovering related functionalities. Additionally, MathWorks blogs are a fantastic resource for keeping up with new features, with many bloggers highlighting updates following each release.
Exciting Updates on the Horizon:
For the R2024a release, see my blog article on new graphics and app building features which is followed by several articles that take a deeper dives into those features. Better yet, subscribe to the MathWorks blogs now because there are more articles on new features that will be published soon!
How do you discover new features in MATLAB, and do you have any suggestions for improving this process? I'm particularly eager to hear your thoughts and ideas on this topic!
goc3
goc3 il 1 Maggio 2024
That is quite the response, Adam—quality, as always. You provided many useful points for effecitvely troubleshooting in MATLAB. I found the points you mentioned to inspect variables interesting. While I do sometimes use those techniques, the vast majority of my debugging time involves watching the Workspace to see which variables are present and inspecting some of them directly in the Variable Editor—it can be fun to watch values update here while stepping through code.
Regarding new features, I do sometimes read some of the release notes, but there are often a lot. And, they do not always provide granular detail about what is updated. For example, see my recent response regarding Highlighting structure fields in MATLAB editor. It also helps when staff such as Mike Croucher and Steven Lord post a Discussion topic on the most recent release and provide a direct link to a filtered list of recent updates, respectively.
And, to answer your ending question, the most effective method for me to learn new/hidden MATLAB functionality is talking with MathWorkers and taking official training courses. There is so much in this application that reading the documentation can be overwhelming!
goc3
goc3 il 25 Apr 2024
How do you create a robust app, function, class, etc.?
For example, how do you:
  • maximize the flexibility of the code you write to accommodate future changes
  • ensure all potential error paths are caught and appropriately handled
  • future-proof the code against inevitable modifications to future releases of MATLAB?
Obviously, answers to such questions can easily delve into details depending upon specific problems or use cases. I am looking for general guidelines, principles, suggestions, etc.
Adam Danz
Adam Danz il 6 Maggio 2024
This is an excellent question and one that's crucial at MathWorks. We have a comprehensive system of checks and balances to ensure that the code we develop meets high standards of robustness, flexibility, and future-proofing. This includes a thorough review process for new features and changes, as well as rigorous testing by our Quality Engineers, like Steven Lord, who ensuring code quality before any changes are added to the codebase. We all have fun trying to break new features before customers have access to them. The impressive amount of attention and coverage put on features before delivery is part of what makes MATLAB special.
But since this is an Ask ME Anything, I'll share some principles that I follow and continualy improve upon.
Write Modular Code: Early in my MATLAB user days, I often found myself adding small components to existing code until it became unwieldy, analogous to a swiss army knife. This taught me the importance of encapsulation—structuring code into functions or classes to make it more manageable, readable, and easier to debug.
Design with Flexibility in Mind: Considering how others might use a function or feature is key. Initially, I designed code mainly for my own use cases, which sometimes led to overly restrictive input options. Over time, I've learned to anticipate a broader range of inputs, making my code more flexible and user-friendly.
Graceful Input Validation: Input validation is crucial, but it's important to avoid overly restrictive requirements. I've learned to balance the need for validation with the need to accommodate a variety of input types and edge cases, ensuring my code is both robust and user-centric. Avoid the temptation to fix inflexible code by restricting inputs, when appropriate.
Write Tests: Utilizing MATLAB's Testing Framework has transformed how I approach testing. Before integrating this framework into my workflow, I often created test scripts that manually verified the expected outputs and expected error conditions. These test scripts are seen in some of my contributions to the MATLAB File Exchange. On occasion, I wrote tests within the analysis pipeline as sanity checks to confirm that the results make sense given some kind of criteria.
goc3
goc3 il 24 Apr 2024
Aside from MathWorks.com, what public resources (books, videos on YouTube, online articles, etc.) have you found to be the most helpful in learning to program well in MATLAB?
Adam Danz
Adam Danz il 30 Apr 2024
This is a great question, and I believe the answer evolves as we advance through the learning curve. Before transitioning to MATLAB, my go-to tool was Excel, where I heavily relied on writing macros for common tasks. I switched to MATLAB out of necessity, working with large quantities of multidimensional data on a daily basis. My initial learning phase was admittedly slow. The game-changer for me, embarrassingly a few months in, was discovering the help() and doc() commands.
While the doc remains my primary resource and MATLAB Answers a close second, you're curious about resources outside of MathWorks. I occasionally visited Yair Altman's Undocumented MATLAB blog to uncover insights not directly addressed in the official documentation. I also sat in on a basic MATLAB course at my university but I found that self-led exploration was more conducive to my learning.
Videos serve as a more passive learning tool for me. Whenever an intriguing MATLAB video pops up in my feed, I bookmark it to listen while engaging in household chores. MATLAB is so vast that you'll likely hear about a function, syntax, or workflow you hadn't previously come across. That helps to expand your MATLAB toolkit.
When it comes to implementing cutting-edge algorithms or analyses in my personal projects, I often turn to academic papers.
Learning to "program well" is a nuanced topic, largely dependent on what you're optimizing for. Speed is a common objective, yet improvements in this area can sometimes sacrifice readability, which is crucial during the early stages or within team projects. The balance often involves code comments, although even this practice is subject to debate. For instance, a line of code may be updated without a corresponding adjustment to its comment, leading to potential confusion.
I'm eager to hear about the resources readers think MathWorks could further develop. On that note, I'm exploring new topics for our Graphics and App Building blog – are there specific areas within graphics and app development you're interested in diving deeper into?
Keep the questions coming!
Cris LaPierre
Cris LaPierre il 25 Apr 2024 (Modificato il 16 Maggio 2024)
I'll comment on some public resources MathWorks has supported
This first one is on mathworks.com, but worth mentioning.
Online Training Suite - MathWorks is investing heavily in self-paced online trainings. Anything called an onramp is free for everyone. Others require a subscription to Onilne Training Suite. If you have a site license (Campus-wide/enterprise/etc), access may be included.
MOOCs Using MATLAB and Simulink - These are free courses that use MathWorks products in the course of teaching. They do not necessarily focus on teaching our products, but use them as a tools to better communicate the topic.
Some specific courses you may be interested in
MATLAB YouTube Channel - videos covering a variety of topics. This can be a bit overwhelming at first due to the volume of content. Some intro videos I'd recommend are
Books using MATLAB & Simulink - List of books that use MATLAB & Simulink. This is not an exhaustive list. Most if not all of those listed have received some level of support from MathWorks.
Craig
Craig il 25 Giu 2024 (Modificato il 25 Giu 2024)
Great Stuff! I would add "Master Classes with Loren Shure" as a fantastic resource, wish there were more of these!
goc3
goc3 il 25 Apr 2024
That books link is helpful. I did not know that MathWorks maintained such a list. It is more productive than searching for MATLAB-related books on Amazon!
Chen Lin
Chen Lin il 25 Apr 2024
@Rena Berman: This is a great list. We probably should add it to our MATLAB FAQ at some point.
Nagendra
Nagendra il 24 Apr 2024
I also wondered the same, thanks for sharing this information. Whole heartedly thank you to those staff and non-staff volunteers who have contributed so far and about to contribute in the furture.
Hans Scharler
Hans Scharler il 24 Apr 2024
Okay, you got me to bite... sasquatches?
Adam Danz
Adam Danz il 26 Apr 2024 (Modificato il 26 Apr 2024)
While I'm not a sasquatch specialist, who can resist the allure of mysteries lurking in the wild? Sometimes people ask questions about topics that do not exist such as "What's the best way to dynamically name a variable in MATLAB?" or "Why is it a good idea to use global variables instead of input arguments?". Sasquatches fall into this category. None of these things exist, but they are fair questions for this AMA!
On that note, let's look at a dataset of sasquatch sightings available on data.world!
%% Load data
file = "bfro_locations.csv";
T = readtable(file);
%% Clean data
% For some reason, there are some very large negative longitudes
% in bfro_locations.csv; we'll remove them
T(T.longitude < -360, :) = [];
% Convert datetime string to datetime
T.timestamp = datetime(T.timestamp,'InputFormat','uuuu-MM-dd''T''HH:mm:ss''Z''');
%% Plot data
fig = figure();
tcl = tiledlayout(fig,3,1,'TileSpacing','compact','Padding','compact');
gax = geoaxes(tcl);
gax.Layout.TileSpan = [2,1];
s = geoscatter(gax,T,"latitude", "longitude", 'filled');
s.SizeData = 20;
s.MarkerFaceAlpha = .4;
ax = nexttile(tcl);
plot(ax,sort(T.timestamp),1:height(T))
xlabel(ax,'Date')
ylabel(ax,'Sightings')
% labels
text(datetime(1958,6,1),500,['Footprints',newline,'hoax',newline,'\downarrow'], ...
'HorizontalAlignment','center','VerticalAlignment','baseline') % approximate date
Ned Gulley
Ned Gulley il 24 Apr 2024
I had the same question. Are you a sasquatch specialist, or do you delight in cryptids of all kinds?

Tag