主要内容

搜索


Categorical navigation is now available in MATLAB Answers.

  • Categories empower you to find, watch, and answer questions by topic and product, rather than product alone.
  • Individual answers have been categorized using an AI model written by MathWorks developers. Read more about our method here.

FAQ

1. What if I've bookmarked or subscribed to a product?

The links will continue to work but use a different filter mechanism.  We encourage you to try the new category filter, to find more questions in your topic of interest.

2. Can I still select a product on the question?

Yes - and product and tags are factored into the text analytics algorithm.  Correcting those fields should improve the nightly categorization. 

Categories are also shown in the Help Center.

Check out your favorite topic of interest and let us know how we're doing in the comments below!

Hi Distance Learning Community members, if you are looking for content in Descriptive Statistics and Probability Distributions for teaching in a course or just brushing up on the concepts yourself, check out these Live Scripts developed by Dr. Ward Nickle from Humboldt State University. If you are interested, this material is also available in Japanese . Enjoy and looking forward to hearing your thoughts!!

What amazing images can be created with no more than 280 characters of MATLAB code? Check out the GALLERY of 700+ entries from the MATLAB Mini Hack contest.

VOTE on your favorite images and help fight the global pandemic! For every vote an entry gets, MathWorks will donate $1 to Direct Relief *.

How can I vote?

1) You need to log in with your MathWorks Account. If you do not have a MathWorks Account, you can create one at MathWorks sign in .

2) You can vote for an entry by clicking on the heart icon on an entry card or the vote button on the entry detail page.

*Maximum amount of $20 donated per entry; maximum of $20,000 donated based on the combined totals raised from the Treasure Hunt contest and the MATLAB Mini Hack contest.

As part of MATLAB Central’s 20 year anniversary celebration, we created the MATLAB Mini Hack . The contest starts today on Oct. 4th!

What to do?

Generate an interesting image using up to 280 characters of MATLAB code.

Who can play?

Participants across all skill levels are welcome. Create original entries of your own code, remix others’ entries and make them your own, or simply vote on ENTRIES you love!

How to win prizes?

Those at the top of the leaderboard at the end of the contest will win up to $300 Amazon gift cards, 5 customized T-shirts, or special badges. Visit the prizes section on the contest page for more information.

To add more fun, we will award RANDOM PRIZES that every participant has a chance to win.

  • Each week, we will pick 5 players who participate in both the Treasure Hunt and MATLAB Mini Hack .
  • Each week, we will have different surprise giveaways.

Important Notes

  • The first week (Oct. 4th, 2021 ~ Oct. 10th 2021) is for creating entries only. Voting starts on Week 2.
  • Make sure you follow the contests (click the ‘follow the contests’ button on the top) to get notified when prizes are awarded and of other important announcements.

We hope you are the winner!

MATLAB Documentation
47%
Videos
14%
MOOCs
2%
MATLAB Central Community
14%
Examples
22%
Other(Explain in comments)
2%
2608 个投票
I need to put a number of problems on MATLAB cody under same Problem group, as many other people have done.
Can anyone please help me on this.

R2021b is live! There are two new products, five major updates, and hundreds of other feature updates in this latest release. Download or access MATLAB Online to discover what’s new.

New Products

Major Updates

  • Lidar Toolbox - Use Lidar Viewer app to visualize, analyze, and preprocess lidar point clouds interactively
  • Simulink Code Inspector - Use Code Inspector contextual tab to check compatibility, inspect code and view results directly in the model
  • Simulink Control Design - Design Model Reference Adaptive Controllers
  • Symbolic Math Toolbox - Get guidance for symbolic workflows with next-step suggestions in MATLAB Live Editor
  • Wavelet Toolbox - Use wavelet analysis to process and extract features for signals and images for AI workflows

Check out our release highlight page for details.

Share your experience with the community

Are there any new features you find particularly useful? Are you trying the new product to solve a particular problem? Share your story with us no matter it’s big or small. We plan to publish those stories in the highlight channel so that community users can get more out of the new release. A good example is an article written by Adam Danz . If you are interested, contact me via email on my profile card.

Several educators worldwide use MATLAB Grader to scale assessments and automatically grade MATLAB coding assignments. MATLAB Grader can be used in any learning environment, for both formative assessments with automated feedback and summative assessments, such as quizzes and exams.

Educators often revise and update their MATLAB Grader problems. They may sometimes want to revisit a past version of a problem, such as to debug an assessment test error. Instructor users can now browse the version history for a specific problem and see draft and final versions.

Note that the versions are read-only and rollback is not supported at this time. However, you can copy code or descriptions and update the problem accordingly.

Get started with MATLAB Grader. If you are new to it, watch the MATLAB Grader Overview video and try the interactive Teaching with MATLAB online course (Section 6 is about MATLAB Grader).

Join our celebration of the 20th anniversary of MATLAB Central community! You are invited to enter 2 contests - A Treasure Hunt and a MATLAB Mini Hack - to have fun and win prizes.

How to Play

  • In the Treasure Hunt, complete 10 fun tasks to explore the ‘treasures’ in the community.
  • In the MATLAB Mini Hack, use up to 280 characters of MATLAB code to generate an interesting image. Simply vote for the entries that you like or share your own entries to gain votes.

Prizes

You will have opportunities to win compelling prizes, including special edition T-shirts, customized T-shirts, Amazon gift cards, and virtual badges. Your participation will also bump up our charity donations.

Ready to participate?

Visit the community contests space and choose the contest you’d like to enter. Note that:

  • You need a MathWorks account to participate. If you don’t have a MathWorks account, you can create one at MathWorks sign in .
  • Make sure you follow the contests (click the ‘follow the contests’ button on the top) to get notified for prize information and important announcements.

For the full contest rules, prizes, and terms, see details here .

We hope you enjoy the contests and win big prizes. NOW, LET THE CELEBRATION BEGIN!

Let's say MathWorks decides to create a MATLAB X release, which takes a big one-time breaking change that abandons back-compatibility and creates a more modern MATLAB language, ditching the unfortunate stuff that's around for historical reasons. What would you like to see in it?
I'm thinking stuff like syntax and semantics tweaks, changes to function behavior and interfaces in the standard library and Toolboxes, and so on.
(The "X" is for major version 10, like in "OS X". Matlab is still on version 9.x even though we use "R20xxa" release names now.)
What should you post where?
Wishlist threads (#1 #2 #3 #4 #5): bugs and feature requests for Matlab Answers
Frustation threads (#1 #2): frustrations about usage and capabilities of Matlab itself
Missing feature threads (#1 #2): features that you whish Matlab would have had
Next Gen threads (#1): features that would break compatibility with previous versions, but would be nice to have
@anyone posting a new thread when the last one gets too large (about 50 answers seems a reasonable limit per thread), please update this list in all last threads. (if you don't have editing privileges, just post a comment asking someone to do the edit)

MATLAB Mobile makes it convenient to learn and teach in disciplines requiring computational thinking, such as mathematics, science, and engineering. It can also be used for virtual labs by acquiring smartphone sensor data. As an instructor, you can author examples in MATLAB and demonstrate them on your smartphone or tablet. Students can follow along on their mobile device or tablet to instantly connect results to the concepts they are learning. This is especially relevant for distance learning, where some students may have limited or no access to a full-fledged computer.

Educators make their course material more interactive, promote self-directed learning, and increase student engagement through Live Editor. You can now run and edit live scripts on iOS and Android devices.

Get MATLAB Mobile on the Play Store or App Store, or learn how to teach using Live Scripts.

Water
27%
Tea
13%
Coffee
28%
Juice
4%
Something harder
18%
Nothing, I'm good
10%
13353 个投票

Nowadays, many instructors are integrating AI to their courses. In a distance learning setting, the hardware students use to train their models vary. Training time of the deep learning models can be shortened with a pool of GPUs, CPUs or a pool of CPUs and GPUs locally or in the cloud. Accuracy of the results can depend on the hyperparameters used to train the models.

In MATLAB, Experiment Manager (introduced in R2020a) makes it easy to train networks with various hyperparameters and compare the results. Different models can be run in parallel by clicking on “Use Parallel” button in Experiment Manager App. But what if your computer has multiple CPU cores and a GPU? Would you be able to use Experiment Manager with a pool of CPUs and a GPU? The answer is “yes”. For example, my computer has 1 NVIDIA GPU and an 8 core CPU. To use all these computational resources, I typed these lines in my command window in MATLAB:

parpool(9);
spmd
if labindex==1
gpuDevice(1); %select GPU on worker 1
else
gpuDevice([]); %deselect GPU on remaining workers
end

Then, I clicked on “Use Parallel” button in Experiment Manager and used a modified setup function in Experiment Manager to change the execution environment from CPU to GPU:

if isempty(parallel.gpu.GPUDeviceManager.instance.SelectedDevice)
options=trainingOptions(~,"ExecutionEnvironment",'cpu');
else
options=trainingOptions(~,"ExecutionEnvironment",'gpu');
end 

Default training options automatically use an NVIDIA GPU if there is one, and specific hardware can be selected using “ExecutionEnvironment” in the trainingOptions.

If you like to learn more about the fundamentals of parallel computing, check out “Parallel Computing Fundamentals” on our documentation and gain some hands-on experience with Parallel Computing through "Parallel Computing Hands-On Workshop" .

Educators use MATLAB Grader to automatically grade MATLAB code, to provide feedback to their students and to scale assessments for large lectures. If you use MATLAB Grader in our browser-based environment at grader.mathworks.com you can view various individual and aggregate student performance analytics. You can export the MATLAB Grader Assignment Report to analyze your student’s performance in more detail:

To make things easy for you, we provide a utility to create customizable assignment reports from the MATLAB Grader Assignment Report. With this utility you can quickly make lists of students with a metric that defines how well they solved the problems within the assignment. You can explore the number of problems each student solved correctly, calculate the mean percentage score they received for the problems or specify points per problem and calculate the points they scored on the assignment.

Please download the utility Customizable Assignment Report for MATLAB Grader from File Exchange. If you are new to MATLAB Grader, watch the MATLAB Grader Overview video and try the interactive Teaching with MATLAB online course (Section 6 is about MATLAB Grader).

An earlier tip suggested using MATLAB Drive to share and collaborate with others using MATLAB Online or MATLAB on desktop systems. Starting in MATLAB R2021a, there is yet another advantage of using this approach – the 'matlabdrive' function returns the path to the folder that contains the content of your MATLAB Drive.

After sharing their files, instructors sometimes direct students to navigate to a specified folder or add certain folders to the MATLAB search path. This ensures that MATLAB can discover the scripts, functions, and other files contained within. Since the MATLAB Drive folder may be installed in different locations on each users’ computer, this could not be done programmatically. Unfortunately, students may miss these instructions and encounter errors. The same can happen between peers working in groups.

Add the matlabdrive function in your code to obtain the path of the MATLAB Drive folder. You can then use functions cd and fullfile to navigate directly to that location or a subfolder. With addpath, you can also add these to the MATLAB search path. For example,

>> drivePath = matlabdrive 
drivePath = 'C:\Users\username\MATLAB Drive' 
>> folderPath = fullfile(matlabdrive, ‘myfolder’) 
folderPath = 'C:\Users\username\MATLAB Drive\myfolder’ 
>> cd(folderPath)	% Change current folder to ‘myfolder’ in MATLAB Drive 

You can run matlabdrive from your desktop or from other MATLAB environments such as MATLAB Online. On desktop systems, you must have MATLAB Drive Connector installed. If MATLAB is unable to find the MATLAB Drive folder, matlabdrive returns an error.

The Symbolic Math Toolbox includes functions for solving, visualizing, and manipulating symbolic math equations. In combination with MATLAB’s Live Editor, it provides an easy, intuitive, and complete environment to interactively learn and teach algebra, calculus, and ordinary differential equations.

Starting with MATLAB R2021a, you can represent matrices and vectors in compact matrix notation with a new symbolic matrix variable data type. This enables a concise typeset display and show mathematical formulas with more clarity. Using them, you can show matrix- and vector-based expressions the way they are displayed in textbooks.

Contrast the visual difference between matrices of symbolic scalar variables and the new symbolic matrix variables:

The syms and symmatrix functions create symbolic matrix variables. To convert a symbolic matrix variable to an array of symbolic scalar variables, use symmatrix2sym. For an example, see Create Symbolic Matrix Variables.

If your university is among the thousands worldwide with a Campus-Wide License, you have unlimited access to all MathWorks products. Therefore, when sharing your MATLAB code online or with collaborators and students, you may want to verify which add-ons or toolboxes it requires. You may also have received files and want to determine missing add-ons or toolboxes you need to install in order to run it.

Starting in R2021a, MATLAB’s Dependency Analyzer detects and lists required add-ons, including apps and toolboxes, for a whole MATLAB Project or for selected files. It can also identify which file is introducing a product dependency. For more details, see Find Required Products and Add-Ons.

All the players now have the ability to filter the Cody problems based on the difficulty level. You can also sort based on the difficulty level. Try it out and let us know what you think.

Improving accessibility in higher education – whether on-campus or virtual – is important to ensure the learning experience accommodates all. MathWorks is committed to improving the accessibility of its software products for users with disabilities.

In MATLAB Online, you can use a screen reader to interact with the Command Window, create and edit scripts and functions in the Editor, and navigate through the MATLAB desktop tools. For more information, refer to the documentation page Use a Screen Reader in MATLAB Online .

You can learn more and sign up for usability research to improve the accessibility of MATLAB Online in the Accessibility Statement for MATLAB page.

The community team is pleased to release a new design for File Exchange review section. The new design has addressed major pain points we heard from File Exchange users and improves the overall experience. Major improvements include:

1. Support editing ratings/comments

Editing is probably the most popular feature request from File Exchange users. Now, you are able to edit your ratings/comments. Simply click the ‘Edit’ link below your content.

2. Support replying to a comment

In the old design, the only way for the file author to reply to a comment is to create a new comment, which is very hard to track. With the new design, the authors can directly reply to a comment and their post has a blue background making it easier to see. Due to differences between the old and new commenting structures, replies to comments couldn't be reliably inferred, so all comments added prior to 7/14 are at the same indentation level. Replies will be indented from now on.

3. Support rich formatting and attachments

Using the new rich text editor, you are able to choose bold/italic text, insert code or image, create lists, or attach files.

4. Introduce the ‘Discussions’ tab

There is a new ‘Discussions’ tab where community users have conversations with the author or other community members for Q&As or general discussions. The discussions section supports threaded discussions to facilitate the conversations. We separate Discussions with Reviews so that different types of content are not mixed together.

This is a major change for File Exchange and we look forward to hearing from you. Simply reply to this article if you have any questions, comments, or suggestions.