Answered
Extract brushed data programmatically
To get the coordinates of selected data points, you can follow the example in this answer. That answer shows that BrushData is ...

3 years ago | 1

| accepted

Answered
how to make Plot a rectangle Using the XY Graph Block
See https://www.mathworks.com/help/simulink/ug/plot-circle-with-xy-graph.html

3 years ago | 0

Answered
Plot a polygon on web world map
> Is there a way to plot a free hand polygon using drawpolygon function on web world map (webmap)? Polygon objects created in d...

3 years ago | 0

Answered
Scroll to location within uidropdown
Currently there isn't a way to programmatically scroll within a DropDown list. Two workarounds could be to use a uilistbox or...

3 years ago | 1

Answered
Matlab app designer error related to an array
The table appears to be empty (running from m-file) MQTTSignal = mqttclient('tcp://broker.hivemq.com','Port',1883) dataTT = re...

3 years ago | 0

| accepted

Answered
How to left align YDisplayLabels in a heatmap
You can pad the labels with empty spaces so that all labels are the same length using labels={'aaaa','bbb','c'}; h1=heatmap(r...

3 years ago | 0

Answered
How to set color gradient based on z axis?
scatter3(X,Y,Z,S,C) hSc3 = scatter3(T.CED(ix),T.r(ix),T.E0(ix),36,T.E0(ix),'filled');

3 years ago | 0

Answered
I have the following signal with some peaks and some valleys. Is it possible to make the baseline zero?
Since you just want the baseline shift, you just need to fit the y-intercept which would be a 0-degree polynomial. Here's a de...

3 years ago | 0

Answered
How can I change the value of x and y axes?
You must be using mesh(Z) If you want to specify the x and y coordinates, use mesh(X,Y,Z). If x and y are in radians, convert...

3 years ago | 0

| accepted

Answered
Legend showing same symbol for loop plot
Try this for i=1:size(obs,1) x = V(:,1)'*obs(i,:)'; y = V(:,2)'*obs(i,:)'; z = V(:,3)'*obs(i,:)'; if(grp{i}...

3 years ago | 0

| accepted

Answered
How to filter out dates within a datetime list?
Here are the steps you can take. 1. NOAA contains dates and durations in separate variables. Combine them into 1 datetime vec...

3 years ago | 1

| accepted

Answered
How to control latex TickLabel FontSize?
Two methods Set FontSize property figure() ax = gca(); set(ax, 'TickLabelInterpreter', 'latex', 'YTickLabel','$\frac{a}{b}$'...

3 years ago | 0

| accepted

Answered
How can I give a location to the text written in Yline type plots , without making it an object?
You can specify which side of the axes the label is printed using the LabelHorizontalAlignment property. Alternatively, you c...

3 years ago | 1

Answered
What is the best way to check the inputs of a function?
I'm sure there are varying opinions on this. Here are some bits that might help with your decision. function argument validat...

3 years ago | 1

| accepted

Answered
prompt a GUI user to enter different values
Put your dialog in a while-loop that exits when the input conditions are met and regenerates the dialog if the conditions are no...

3 years ago | 0

| accepted

Answered
How to extract specific dates from a datetime table?
Datetimes are rounded down to the start of the day using dateshift. Then, ismember finds matches between the two sets of dates....

3 years ago | 1

Answered
How to avoid horizontal shifts after applying GroupByColor on boxcharts?
You can create the boxes in a loop, y = magic(5); [nrows, ncols] = size(y); hold on for i = 1:ncols boxchart(repel...

3 years ago | 1

Answered
Deleting axes changes legend transparency?
In gplotmatrix, the legend is associated with the axes in the upper right corner. When the visibility of that axes is off, the ...

3 years ago | 0

| accepted

Answered
How can I change the font size in the command window for the mode -nodesktop?
Changing the fontsize of the command window programmatically via settings has no effect in -nodesktop. However, starting in R...

3 years ago | 0

Answered
How to align the figure name to the left ?
Starting in MATLAB R2020b, control the horizontal alignment of title and subtitle using the axis properties TitleHorizontalAlign...

3 years ago | 3

Answered
Display images instead of numbers in a Matrix.
Here are some solutions using emojis. One emoji, different colors emoji = char([55356 57312]); % "🏠" data = [0 1 0; 1 1 1...

3 years ago | 0

Answered
How to solve the problem that the hybrid algorithm in mixed integer programming is ignored
As per the documentation (see this page), there are some restrictions on the types of problems that ga can solve when you includ...

3 years ago | 0

| accepted

Answered
What is the meaning of x=x(:).'?
This ensures x is a row vector. It is useful when you are unsure of the size or shape of an input but you need it to be a row...

3 years ago | 1

Answered
compare variable with different data types
Detect if x is a string or character array Validate the string and convert it to a logical where yes==true Use a conditional s...

3 years ago | 0

Answered
Can you create frames in Figure?
This demo uses uigridlayout and uipanel to create 4 panels. Using tiledlayout, it creates 4 axes within each panel. You can se...

3 years ago | 1

| accepted

Answered
uiprogressdlg does not broadcast PostSet
> Is this a bug or did I just do something wrong? You aren't doing anything wrong. There's a difference in how the CancelReque...

3 years ago | 0

Answered
How to plot multiple y-axis with data points on the axis
See parallelplot h = parallelplot(rand(3,4));

3 years ago | 0

| accepted

Answered
The stop button doesn't terminate the process when pressed.
Looks like status2 = handles.stopval should be status2 = handles.stopval.Value;

3 years ago | 0

Answered
transparency issue using "plot" function
Applying transparency to line objects is not documented and leads to issues in some circumstances (e.g. live scripts and loading...

3 years ago | 0

Answered
Plot with the same Y-axis on both sides
You can use yyaxis but you need to link the left and right y rulers so when one changes, the other updates. This comes in handy...

3 years ago | 3

Load more