Answered

how to scale arrows

Quiver scaling can be tough to understand. We recently added the ScaleFactor property (R2024a) to help out. See this answer fo...

how to scale arrows

Quiver scaling can be tough to understand. We recently added the ScaleFactor property (R2024a) to help out. See this answer fo...

5 months ago | 0

Answered

How can i set the dimension of the arrow in a quiver plot?

Understanding quiver auto scaling When using quiver(X,Y,U,V,__), U and V are the horizontal and vertical vector magnitudes. Ho...

How can i set the dimension of the arrow in a quiver plot?

Understanding quiver auto scaling When using quiver(X,Y,U,V,__), U and V are the horizontal and vertical vector magnitudes. Ho...

5 months ago | 0

Answered

rotate3d not working properly with matlab GUI and pcshow function

> ...the rotation of the axis is somehow buggy (everytime I klick again, it jumps to another view) and ... the cursor does not c...

rotate3d not working properly with matlab GUI and pcshow function

> ...the rotation of the axis is somehow buggy (everytime I klick again, it jumps to another view) and ... the cursor does not c...

5 months ago | 0

Answered

view() not returning [az, el] ??

The azimuth and elevation outputs are returned as two separate outputs. f = figure('visible','off'); ax = gca(f); [az, el]...

view() not returning [az, el] ??

The azimuth and elevation outputs are returned as two separate outputs. f = figure('visible','off'); ax = gca(f); [az, el]...

5 months ago | 1

Highlighted

AMA: The secret of staff contributors in the Answers forum

Welcome to MATLAB Central's first Ask Me Anything (AMA) session! Over the next few weeks, I look forward to addressing any...

5 months ago | 23

Answered

One legend for a group of subtightplots

That FEX function subtightplot is very useful but since R2019b you can use tiledlayout instead and since R2020b, tiledlayout sup...

One legend for a group of subtightplots

That FEX function subtightplot is very useful but since R2019b you can use tiledlayout instead and since R2020b, tiledlayout sup...

5 months ago | 1

| accepted

Published

Introducing the Color Picker Component

Guest Writer: Kristen Amaddio Kristen Amaddio is the Senior Team Lead for the MATLAB UI Components team. She first joined...

5 months ago

Answered

Why are my error bars multicoloured with no line?

Understanding array size compatibility errorbar, like plot, supports mixed array sizes in input arguments as long as the sizes ...

Why are my error bars multicoloured with no line?

Understanding array size compatibility errorbar, like plot, supports mixed array sizes in input arguments as long as the sizes ...

5 months ago | 0

Answered

How to erase a specific elements for the name of string values and then replace them?

Assumptions: "Temp_06_02_24_10_39_34 = 32"; is a string This is not a variable name The month is in the 2nd numeric positio...

How to erase a specific elements for the name of string values and then replace them?

Assumptions: "Temp_06_02_24_10_39_34 = 32"; is a string This is not a variable name The month is in the 2nd numeric positio...

5 months ago | 1

| accepted

Answered

How to make sparsity pattern graph with grouping

Using pcolor This solution uses pcolor and converts the table of 0s and 1s into grouping values that are used to assign color t...

How to make sparsity pattern graph with grouping

Using pcolor This solution uses pcolor and converts the table of 0s and 1s into grouping values that are used to assign color t...

5 months ago | 2

| accepted

Answered

UIalert icon disappears in deployed application

Thanks for reporting this, David. We are aware of the problem. Stay tuned for updates.

UIalert icon disappears in deployed application

Thanks for reporting this, David. We are aware of the problem. Stay tuned for updates.

5 months ago | 0

| accepted

Published

Introducing Transparency to Legends and Rectangles

Guest Writer: Afiq Azaibi Today's R2024a feature highlight is written by Afiq Azaibi, a developer on the Charting Team and...

5 months ago

Answered

Plot of histogram and probability distribution function.

To equate the colors between the histogram and line pairs, access the object handles from the plot output and then set the Serie...

Plot of histogram and probability distribution function.

To equate the colors between the histogram and line pairs, access the object handles from the plot output and then set the Serie...

5 months ago | 0

| accepted

Answered

Subplot x-axis

Use linkaxes to link the two x axis limits. When the limits of one x-axis changes, the other will adjust. I made 6 changes to...

Subplot x-axis

Use linkaxes to link the two x axis limits. When the limits of one x-axis changes, the other will adjust. I made 6 changes to...

5 months ago | 0

| accepted

Answered

How to have a different interval between xticks and xticklabels on a datetime plot?

The x_period_dates variable is all you need. It's a datetime vector containing all of the dates at midnight. You just need to ...

How to have a different interval between xticks and xticklabels on a datetime plot?

The x_period_dates variable is all you need. It's a datetime vector containing all of the dates at midnight. You just need to ...

5 months ago | 0

| accepted

Answered

How to draw an histogram?

> How do I draw an histogram knowing the number of times all elements in a 150x150 matrix appears using matlab? Both histogram ...

How to draw an histogram?

> How do I draw an histogram knowing the number of times all elements in a 150x150 matrix appears using matlab? Both histogram ...

5 months ago | 0

| accepted

Answered

Given a contour plot is there a function which returns a matrix corresponding to the density of lines at a given (x,y) coordinate?

No, there is not a function that computes the density of contour lines. However, you could build such a function. First, you...

Given a contour plot is there a function which returns a matrix corresponding to the density of lines at a given (x,y) coordinate?

No, there is not a function that computes the density of contour lines. However, you could build such a function. First, you...

5 months ago | 1

| accepted

Published

R2024a release: What’s new in Graphics and App Building?

There are dozens of new graphics and app building features in the MATLAB R2024a release. Here are some highlights to keep...

5 months ago

Answered

How to update vehicle's state variable in simulator?

I think the choice between the two options depends on a few factors. Relying on the state space equation (x'=Ax+Bu) involves c...

How to update vehicle's state variable in simulator?

I think the choice between the two options depends on a few factors. Relying on the state space equation (x'=Ax+Bu) involves c...

5 months ago | 0

Answered

Plotted patch changes size

Cause of the problem Indeed you are setting the patch location based on the ylimits but you are not setting the ylimits. After...

Plotted patch changes size

Cause of the problem Indeed you are setting the patch location based on the ylimits but you are not setting the ylimits. After...

5 months ago | 1

| accepted

Answered

Create mean y values by multiple groups in one graph

Use groupsummary to compute the means of each group. Then plot the results using bar() with categorical x values. This assumes...

Create mean y values by multiple groups in one graph

Use groupsummary to compute the means of each group. Then plot the results using bar() with categorical x values. This assumes...

5 months ago | 0

Answered

Plot a time series plot in customized rectangle

Previous answers suggest changing the size of the figure window which is one solution. Another solution is to set the size of...

Plot a time series plot in customized rectangle

Previous answers suggest changing the size of the figure window which is one solution. Another solution is to set the size of...

5 months ago | 1

| accepted

Answered

Generate 3D histogram while capping the height of bars

How to cap the height of a 2D histogram without affecting the max color for each bar This is tricky because hist3 does not retu...

Generate 3D histogram while capping the height of bars

How to cap the height of a 2D histogram without affecting the max color for each bar This is tricky because hist3 does not retu...

6 months ago | 0

Answered

Change Colors of Multiple Objects Efficiently in AppDesigner with Switch

Looks like you're creating an exciting custom theme for your app @Brianna Billingsley! Here are some strategies to reduce the ...

Change Colors of Multiple Objects Efficiently in AppDesigner with Switch

Looks like you're creating an exciting custom theme for your app @Brianna Billingsley! Here are some strategies to reduce the ...

6 months ago | 1

| accepted

Answered

How to unfade legend placed on an empty (invisible) plot?

It's much better to use tiledlayout than subplot. With tiledlayout, the placement of the legend and the global title can be par...

How to unfade legend placed on an empty (invisible) plot?

It's much better to use tiledlayout than subplot. With tiledlayout, the placement of the legend and the global title can be par...

6 months ago | 0

Answered

Data not aligned after zooming into figure using plotyy

plotyy is not recommended. Instead, use yyaxis which replaces plotyy. I've converted your code below. yyaxis does not have th...

Data not aligned after zooming into figure using plotyy

plotyy is not recommended. Instead, use yyaxis which replaces plotyy. I've converted your code below. yyaxis does not have th...

6 months ago | 2

| accepted

Answered

"The MathWorks" or simply "MathWorks"?

According to this MathWorks Brand Guidelines page, use MathWorks to refer to the company. The legal name of the company is The ...

"The MathWorks" or simply "MathWorks"?

According to this MathWorks Brand Guidelines page, use MathWorks to refer to the company. The legal name of the company is The ...

6 months ago | 1

Answered

Graph lines not showing

max_value_refA = max(out2.Q_i_ref); avg_value_refA = mean(out2.Q_i_ref); yline(max_value_refA, '--k') yline(avg_value_refAm...

Graph lines not showing

max_value_refA = max(out2.Q_i_ref); avg_value_refA = mean(out2.Q_i_ref); yline(max_value_refA, '--k') yline(avg_value_refAm...

6 months ago | 0

Answered

How to show multi data probability densities in one axes?

Plotting two binscatters in one axes This solution does the following: overlay two axes in tiledlayout link the axes limits ...

How to show multi data probability densities in one axes?

Plotting two binscatters in one axes This solution does the following: overlay two axes in tiledlayout link the axes limits ...

7 months ago | 0

Answered

Get quiver plot arrows to connect up contour lines

Let's break this down into steps. This solution doesn't address all of the requirements in the question. Get the arrows to s...

Get quiver plot arrows to connect up contour lines

Let's break this down into steps. This solution doesn't address all of the requirements in the question. Get the arrows to s...

7 months ago | 0