Answered
I need to separate same first column data values and its corresponding second column value.
Another method using groupsummary % Create demo table g = repelem((1:2:9)',randi(4,5,1)+1,1); T = table(g, rand(numel(g),1).*...

5 years ago | 1

| accepted

Answered
Getting the total turning angle of a vehicle's route
This should get you started if I've understood you correctly. I've calculated orientation in two different way. First, observe...

5 years ago | 0

| accepted

Answered
Grouped error bars change position after saving figure
The problem is caused by assigning numeric x-values to the errorbars on a categorical x-axis. The errorbar function works aroun...

5 years ago | 1

| accepted

Answered
Geographical Binning and evaluation of results
Unfortunately hista()does not return a vector of bin numbers for each input coordinate which is hard to believe. According to t...

5 years ago | 2

| accepted

Answered
MATLAB "JoinTwoDatabaseTablesExample" Error
There are several steps needed to set up a data source and connect to Microsoft SQL Server database or Azure Synapse SQL. The...

5 years ago | 0

| accepted

Answered
Plot X,Y 2D and Z where Z containing color intensity
See scatter(x,y,sz,c) or scatter(x,y,sz,c,'filled') where c are your z values.

5 years ago | 0

| accepted

Answered
Unexpected floor() function result?
This is round-off error and is caused by limitation to representing floating point decimals. 1.2-floor(1.2) 1.2-floor(1.2) -...

5 years ago | 1

| accepted

Answered
How to add common legend at the end (Bottom Side) of the whole image
Use TiledLayout instead of subplot to create the axes. Then, after adding the legend, position it on the bottom using the tiled...

5 years ago | 0

| accepted

Answered
Colorbar String Spacing Issue
The problem with overlapping labels must have been solved in Matlab R2021a. I agree that the xlabel should be above the color...

5 years ago | 0

| accepted

Answered
Cutting line/contour line in graph
Since you know the coordinate of the blue trapazoid, you can create a white patch object that is equal to the area under the tra...

5 years ago | 1

Answered
Make distribution visible in scatter plots
You can display the 2D binned density using histogram2. Demo: The plot on the left and right contain the same data. x = 1:105...

5 years ago | 1

| accepted

Answered
How to split cell array made by matrix?
% c is a 1xn cell array where n is an even number n = numel(c); c1 = c(1:n/2); c2 = c(n/2+1:end);

5 years ago | 0

| accepted

Answered
How to keep information private?
Try editing your community profile to change your name. https://www.mathworks.com/matlabcentral/profile/community_profile/edit...

5 years ago | 2

| accepted

Answered
How to eliminate gap between tile charts
Update to Matlab R2021a to take advantage of the new tile spacing when TileSpacing is set to none. See New in R2021a: Improveme...

5 years ago | 0

| accepted

Answered
Comparison among numbers, pls help!
The difference is likely due to round-off error due to floatling point representation To test for equality while ignoring round...

5 years ago | 2

| accepted

Answered
Matrix insertion to a txt-file
Another way to do this is by using formattedDisplayText() which became available in Matlab R2021a (see Community Highlight). ...

5 years ago | 0

Answered
create many bar plots with loop process
If you want all 20 axes on the same figure, the bars will be quite tightly packed. Consider breaking up groups of axes into sepa...

5 years ago | 0

Answered
Set non-uniform axis - extension of certain part of y-axis.
The y-axis in your image is log-scaled and flipped. However, log(0) is undefined (it's -inf in matlab) so the 0-tick in the im...

5 years ago | 0

Answered
Quiver with color: Add-on
You can plot each quiver arrow in a loop to individually control the colors. This demo assigns color according to the magnitude ...

5 years ago | 2

| accepted

Answered
compass plot label FontSize
compass() still uses the old polar axes that are actually cartesian axes with circles and radii to appear as polar axes. The ti...

5 years ago | 0

| accepted

Answered
Restrict panning and zoom limits over multiple axes
You can assign a listener that responds to changes to xlim|ylim in one pair of axes and updates the other pair of axes while mai...

5 years ago | 0

Answered
How can add an image to the plot that moves according to the x,y coordinatates?
Demo 1 shows animation of a car, demo 2 shows animation of a rectangle. Also see this answer that animates a truck crossing a ...

5 years ago | 2

| accepted

Answered
How to do cla reset UIAxes in ML2021a
On what version of Matlab has that syntax ever worked? Even on regular axes, the error message appear. fig = figure('Visible',...

5 years ago | 2

| accepted

Answered
To build a 3d room with 4 walls
> can you help in finding the patch I can help you understand the concept so you can apply it to your thesis work. There are...

5 years ago | 0

| accepted

Answered
Hyperlink in App Designer
For Matlab R2021a or later, use the uihyperlink function or the UI hyperlink component in App Designer or a uifigure to add and ...

5 years ago | 1

Answered
making a figure always on top
Update (10 years later) Starting in Matlab R2021a you can set figures created by uifigure to always be on top of other windows....

5 years ago | 3

Answered
Programatically selecting cells in a uitable
Starting in Matlab R2021a, you can programmatically scroll to any row, column, or cell of a uitable using the scroll function (s...

5 years ago | 0

Answered
Extracting 3 columns from a dataset into a new data set
Join a column of dates with a column of times - datetime format Assuming you're working with datetime values in both columns, t...

5 years ago | 0

| accepted

Answered
How do I use the rectangle function in a GUI axes using AppDesigner?
To specify the parent handle, use the parent name-value pair, but the syntax you used should have also worked. rectangle('Posit...

5 years ago | 0

Discussion


Four New App Features in MATLAB R2021a
*Four (of many) new features for Apps in MATLAB R2021a* These four new features are the solutions to many inquiries in the An...

5 years ago | 5

Load more