Main Content
Results for
You provided 37,574 anwers and received 11,750 votes. You are ranked #2 in the community, Thank you for your contribution to the community!
MATLAB Central Team
Word (Crossword , Wordle, etc.)
19%
Numerical (Sudoku, math, etc.)
33%
Brain teaser, logic
27%
Jigsaw, picture, finding/matching
9%
Wooden, metal, or other mechanical
10%
Other type (comment below)
2%
4398 votes
With the release of MATLAB R2023a, we also are giving you early access to the new MATLAB Desktop. This includes Dark Mode! Download via Add-on Explorer in MATLAB or find here on File Exchange.
These are some of the many enhancements and new features of the new desktop:
- Dark mode / theme support - Change the colors of the desktop by selecting a dark theme.
- Updated layout - Quickly access tools and change your layout using the sidebar.
- Expanded search capabilities - Easily find actions, settings, and resources using the new universal search box.
- Figure toolstrip - Use the new figure toolstrip to easily modify annotations, text, and line styles, and view generated code.
- Keyboard and screen reader accessibility support - Use a screen reader to interact with the Command Window, Editor and desktop tools.
- Enhanced MATLAB Projects workflows - Collaborate using an improved user interface, manage multiple repositories using the Branch Manager, and investigate project hierarchies using the new Dependency Analyzer view.
Have fun trying it out and let us know what you think!
Congratulations, @DGM for winning the Editor's Pick badge awarded for MATLAB Answers, in recognition of your awesome solution in searching for a line of pixels in an image.
Thank you for a very detailed explanation of your solution with a lot of references and working code, providing rationale for why you prefer to use spline.
This is a new badge we just introduced to recognize awesome answers people contribute and yours was picked for discovering a creative way to solve the problem, and made the solution clear, and reproducible. Thank you so much for setting a high standard for MATLAB Answers and for your ongoing contribution to the community.
MATLAB Central Team
Congratulations, @John D'Errico for winning the Editor's Pick badge awarded for MATLAB Answers, in recognition of your awesome solution in Finding linear combination of two vectors such as every element is positive.
Thank you for providing a very detailed and elegant discussion about an interesting math question, both fun and instructional.
This is a new badge we just introduced to recognize awesome answers people contribute and yours was picked for discovering a creative way to solve the problem, and made the solution clear, and reproducible. Thank you so much for setting a high standard for MATLAB Answers and for your ongoing contribution to the community.
MATLAB Central Team
In our community poll ‘Which MathWorks resource is most helpful to you while learning MATLAB?’, Documentation is listed as the most helpful resource by 47% of respondents. However, it’s also worth noting that there is tons of information in the documentation. When you want to learn a topic or get quick reference, a cheat sheet would be very useful and save you time!
We’d like to share with you 9 MATLAB Cheat Sheets for Data Science and Machine Learning! These cheat sheets let you find just the right command for the most common tasks for your data science or machine learning projects.
- Automated Machine Learning (AutoML): automate difficult and iterative steps of your model building
- MATLAB Live Editor: create an executable notebook with live scripts
- Importing and Exporting Data: read and write data in many forms
- Preprocessing Time Series Data: store, merge, and clean multirate time series sensor data
- Machine Learning: discover patterns and build predictive models
- Deep Learning: create, train, and validate deep neural networks
- Text Analytics: preprocess, analyze, and model text data
- Problem-Based Optimization: solve optimization problems using a natural syntax
- Solver-Based Optimization: solve optimization problems using matrices and functions
Check it out and let us know your thoughts.
Join us for three lightening talks about awesome MATLAB projects built by our community. Each talk will be 5-10 minutes and allow everyone a chance to ask questions.
- antonio - Using "uihtml" to create custom app components
- Balrog - Creating generative art with Matlab
- xxtankmasterx - Using Matlab on the Steam Deck for mobile processing and data collection
Time: Check your local time
Contact me if you have a talk for our next event!
Definitely not
29%
Probably not
15%
Neutral
11%
Yes, somewhat
18%
Yes, definitely
20%
Not sure
6%
4598 votes
Congratulations, @Daniel Vieira for winning the Editor's Pick badge awarded for MATLAB Answers, in recognition of your awesome solution in Why are the results of forward and predict very different in deep learning?
Thank you for providing considered advice about reinforcement learning.
This is a new badge we just introduced to recognize awesome answers people contribute and yours was picked for discovering a creative way to solve the problem, and made the solution clear, and reproducible. Thank you so much for setting a high standard for MATLAB Answers and for your ongoing contribution to the community.
MATLAB Central Team
For Q&A
17%
For programming tasks
27%
For writing
9%
For fun
26%
Other use-case not mentioned here
3%
What's ChatGPT?
17%
4555 votes
MATLAB users come to Cody to learn MATLAB and the best way to learn is to learn from other community users. However, when you tried to see all solutions, you saw a message that you had to solve a new problem to unlock all the solutions or submit a solution of a smaller size. This is very confusing and we have been hearing this pain point from users.
Today, the Cody team is pleased to announce that players are able to see all solutions to a problem once they solve it correctly.
After solving a problem, you will see a button that says ‘View Community’s Solutions’, which will bring you to the list of all solutions.
Note that this is our first step in facilitating the learning aspect of Cody. We are actively working on improving the solutions list, so your input is valuable to us. Please let us know your comments or suggestions.
Yes in MATLAB
18%
Yes but only in some other language
22%
Yes in MATLAB and other language(s)
7%
Not yet but would like to learn how
34%
No & don't foresee any need to yet
19%
4243 votes
Every year, we show our appreciation to the top contributors by awarding two types of annual badges: Most Accepted badge and Top Downloads badge.
Most Accepted badge goes to the top 10 contributors whose answers received the most acceptances. Top downloads badge goes to the top 10 contributors with the most downloaded submissions.
In 2022, the recipients for Most Accepted are: @Walter Roberson, @Voss, @Star Strider, @Torsten, @Image Analyst, @Matt J, @KSSV, @Jan, @Stephen23, and @DGM.
The recipients for Top Downloaded are: @Cleve Moler, @Yarpiz, @John D'Errico, @Seyedali Mirjalili, @Rodney Tan, @Yair Altman, @Chad Greene, @Steve Miller, @Giampiero Campa, and @Scott Lowe
Congratulations and thank you again for your outstanding contribution in 2022!
MathWorks is hosting the QIT Boston event to discuss Ethical AI for the LGBTQ+ community on its Lakeside campus, hosted by our own Heather Gorr, PhD.
AI is known to learn biases from the various sources that affects our daily lives, and in particular minority groups like LGBTQ+.
Join the discussion to what the impacts are, where the biases come from, and how to mitigate as you develop AI.
Sign up here
https://www.eventbrite.com/e/oit-boston-panel-discussion-ethical-ai-for-the-lgbtq-community-registration-496419814027
You provided 2,007 anwers and received 529 votes. Thank you for your contribution to the community!
MATLAB Central Team
an undergraduate student
41%
in graduate school
28%
in academia (prof, staff, etc.)
11%
in industry or Non-Gov't Org. (NGO)
11%
in government or military
3%
self employed, retired, or hobbyist
6%
7627 votes
You provided 10,958 anwers at the acceptance rate of 78.95% and received 3,126 votes. Thank you for your contribution to the community!
MATLAB Central Team
What amazing images can be created with no more than 280 characters of MATLAB code? Check out the GALLERY from the MATLAB Mini Hack 2022 contest.
Vote on your favorite MATLAB images before Oct. 30th! We will give out MathWorks T-shirt to 10 lucky voters.
How can I vote?
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.
New in R2022b: GridSizeChangedFcn
tiledlayout() creates a TiledChartLayout object that defines a gridded layout of axes within a figure. When using the 'flow' option, the grid size becomes dynamic and updates as axes are added or as the figure size changes. These features were introduced in R2019b and if you're still stuck on using subplot, you're missing out on several other great features of tiledlayout.
Starting in MATLAB R2022b you can define a callback function that responds to changes to the grid size in flow arrangements by setting the new gridSizeChangedFcn.
Use case
I often use a global legend to represent data across all axes within a figure. When the figure is tall and narrow, I want the legend to be horizontally oriented at the bottom of the figure but when the figure is short and wide, I prefer a vertically oriented legend on the right of the figure. By using the gridSizeChangedFcn, now I can update the legend location and orientation when the grid size changes.
Demo
gridSizeChangeFcn works like all other graphics callback functions. In this demo, I've named the gridSizeChangedFcn "updateLegendLayout", assigned by an anonymous function. The first input is the TiledChartLayout object and the second input is the event object that indicates the old and new grid sizes. The legend handle is also passed into the function. Since all of the tiles contain the same groups of data, the legend is based on data in the last tile.
As long as the legend is valid, the gridSizeChangedFcn updates the location and orientation of the legend so that when the grid is tall, the legend will be horizontal at the bottom of the figure and when the grid is wide, the legend will be vertical at the right of the figure.
Since the new grid size is available as a property in the TiledChartLayout object, I chose not to use the event argument. This way I can directly call the callback function at the end to update the legend without having to create an event.
Run this example from an m-file. Then change the width or height of the figure to demonstrate the legend adjustments.
% Prepare data
data1 = sort(randn(6))*10;
data2 = sort(randn(6))*10;
labels = ["A","B","C","D","E","F"];
groupLabels = categorical(["Control", "Test"]);
% Generate figure
fig = figure;
tcl = tiledlayout(fig, "flow", TileSpacing="compact", Padding="compact");
nTiles = height(data1);
h = gobjects(1,nTiles);
for i = 1:nTiles
ax = nexttile(tcl);
groupedData = [data1(i,:); data2(i,:)];
h = bar(ax,groupLabels, groupedData, "grouped");
title(ax,"condition " + i)
end
title(tcl,"GridSizeChangedFcn Demo")
ylabel(tcl,"Score")
legh = legend(h, labels);
title(legh,"Factors")
% Define and call the GridSizeChangeFcn
tcl.GridSizeChangedFcn = @(tclObj,event)updateLegendLayout(tclObj,event,legh);
updateLegendLayout(tcl,[],legh);
% Manually resize the vertical and horizontal dimensions of the figure
function updateLegendLayout(tclObj,~,legh)
% Evoked when the TiledChartLayout grid size changes in flow arrangements.
% tclObj - TiledChartLayout object
% event - (unused in this demo) contains old and new grid size
% legh - legend handle
if isgraphics(legh,'legend')
if tclObj.GridSize(1) > tclObj.GridSize(2)
legh.Layout.Tile = "south";
legh.Orientation = "horizontal";
else
legh.Layout.Tile = "east";
legh.Orientation = "vertical";
end
end
end
Give it a shot in MATLAB R2022b
- Replace the legend with a colorbar to update the location and orientation of the colorbar.
- Define a GridSizeChangedFcn within the loop so that it is called every time a tile is added.
- Create a figure with many tiles (~20) and dynamically set a color to each row of axes.
- Assign xlabels only to the bottom row of tiles and ylabels to only the left column of tiles.
Learn about other new features
This article is attached as a live script.
Simulink is a block diagram environment used to design systems with multidomain models, simulate before moving to hardware, and deploy without writing code. In this livestream, Sam and Nishan will build up the basics of getting started using Simulink to build models.
Sign up here to get notification when it start streaming at 11:00 am (EDT) on Oct 13 view your timezone