Respondida
Find values within a contour and replace with nan
It sounds like the goal is to hide the scatter points under the contour in which case it would be easiest to use the (x,y) coord...

más de 5 años hace | 0

Respondida
how to plot multiple images (separately) in one window
768 independent axes on a figure will likely be problematicm, specifically the memory needed and the tiny size of each axis. To...

más de 5 años hace | 1

Respondida
Heatmap - number of decimal places on x-axis
Similar to Walter Roberson's answer but does not require undocumented methods (and avoids the associated warning). h = heatma...

más de 5 años hace | 1

| aceptada

Respondida
replacing numbers with text
Here's a more flexible alternative. mymat= [ 4 4 4 3 4 4 1 4 4 4 3 ...

más de 5 años hace | 1

| aceptada

Respondida
Create matrix from 2 columns of a csv file
Summary of comments under the question: Use readtable() to import the data Use table indexing rather than splitting the table ...

más de 5 años hace | 0

Respondida
Grid a plot with diagonal lines
ConstantLine objects extend to the axis limits even when the limits change but as of r2020b, ConstantLine objects can only be ve...

más de 5 años hace | 0

Respondida
For loop that keeps only the first result of a random number generator function for all the loop runs
Select a random seed for the generator and reset the generator every time you want to repeat the same results. https://www.mat...

más de 5 años hace | 1

Respondida
Resolving discrepancy between the number of surfaces generated and the number of surface handles stored in cell array
You're experiencing problems that often occur when loop variables are not preallocated. When i==1, the j-loop has 10 iteratio...

más de 5 años hace | 0

| aceptada

Respondida
boxchart - many questions! Assign BoxFaceColors? separation lines? numeric xGroupData? Location of boxes? number of points?
boxchart vs boxplot >with r2020 there is finally a grouped boxplot called "boxchart". The boxplot() function also has grouping...

más de 5 años hace | 1

| aceptada

Respondida
How to improve groups in boxplot matlab?
To add vertical lines that separate groups from the first grouping variable, add 'FactorSeparator',1. h = boxplot(L_levtrue,{ID...

más de 5 años hace | 0

| aceptada

Respondida
How can I plot with different markers, linestyles and colors in a loop?
Ways to control color and line style 1. LineStyleCyclingMethod In MATLAB R2023a or later, the LineStyleCyclingMethod property...

más de 5 años hace | 4

| aceptada

Respondida
how can i get the regression values into a variable in neural network
After the figure is created from the nntool and is the current figure, these lines below will extract the subplot title informat...

más de 5 años hace | 1

| aceptada

Respondida
Editing the properties of box plot groups.
> I don't know how I can change the color of separator from gray to black. I wish boxplot returned graphics handles, but it doe...

más de 5 años hace | 1

| aceptada

Respondida
Two simple questions about listdlg
No. listdlg does not have a fontsize property and is a modal dialog which suspends execution until a selection is made so there...

más de 5 años hace | 0

| aceptada

Respondida
Convert 4 cell arrays into 4 columns in matrix
This answer shows how to combine column vectors of different lengths into a matrix with NaN values as fillers. https://www.mat...

más de 5 años hace | 0

Respondida
Plot base on index column
Read in your data as a table named T, then follow this demo ID = 1; rowIdx = T.ID == ID; plot(T.Z(rowIdx), T.dist(rowIdx))

más de 5 años hace | 1

Respondida
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. On for loop
Z(i) = C(i).*G G is a 1x4 vector C(i) is a 1x1 scalar when you multiply the two, you get a 1x4 vector You're trying to stor...

más de 5 años hace | 0

| aceptada

Respondida
Timetable Variable grouped by year and stackedplot
Steps taken to break apart a timetable by years and plot in stackedplot The timetable is broken apart by year using arrayfun an...

más de 5 años hace | 1

| aceptada

Respondida
How to Export appdesigner Plot and UITable directly to PDF?
See this summary of methods; pay attention to which Matlab release supports each method. https://www.mathworks.com/matlabcent...

más de 5 años hace | 1

| aceptada

Respondida
Using the command "eval"
Don't use eval() at all. Matlab documentation: Alternative eval() Matlab Fandom: Why is it advised to avoid using the "eval" ...

más de 5 años hace | 1

Respondida
Array of Matrices multiplication
One way to approach this is to break up the 3x4326 matrix into a 3x3x1442 array. data = rand(3,4326); % 3x4326 matrix dataArr...

más de 5 años hace | 0

| aceptada

Respondida
Apps empty although Matlab says Statistics and Machine learning toolbox is installed
I'm not sure why the app doesn't appear in your app list but if you have the Statistics and Machine Learning Toolbox you can ini...

más de 5 años hace | 0

| aceptada

Respondida
Marker doesn't appear in plot3() legend
I assume eList contains a cell array of character vectors (or a string array) that define the legend strings. Try this, hol...

más de 5 años hace | 0

| aceptada

Respondida
Why does my method doesn't recognise the variable U that I defined as global?
Don't use Global variables, especially in AppDesigner! Instead, declare variables that are shared between app functions as priv...

más de 5 años hace | 4

| aceptada

Respondida
drawrectangle not working consistently, help!
In AppDesigner / uifigure & uiaxes, drawrectangle is horribly slow and does not show the rectangle borders immediately. It's so...

más de 5 años hace | 0

| aceptada

Respondida
How to extract a part of the spectrogram?
Three approaches to selecting a range within a spectogram Use saveas to save figures as any format. 1. Simple xlim & ylim A s...

más de 5 años hace | 1

| aceptada

Respondida
Please solve the following question
The variable diff is a 4x4 matrix. diff = 22 7 -4.5 10.5 29 2.5 ...

más de 5 años hace | 0

Respondida
How to make the y axis 'counts' and x axis the variable on Histograms
Set the orientation property to horizontal. histogram(rand(1,1000),'Orientation','horizontal')

más de 5 años hace | 0

Respondida
How create a matrix that matches a condition in comparison with other matrix?
A=[ 1 10 1 9 1 8 1 7 1 6 2 15 2 14 2 13 2 12 2 11 3 18 3 17 3 16 3 15 3 14 4 12 ...

más de 5 años hace | 1

| aceptada

Respondida
How to plot a range with stackedplot()
As the error message indicates, you cannot specify both the Source Table and the XData/YData. You can either use indexing the ...

más de 5 años hace | 0

Cargar más