Answered
Partial Zoom in subplot function
axes('position', ...) does not zoom into the axes. It sets the position of the axes relative to the figure. To zoom into a s...

6 years ago | 0

| accepted

Answered
title for displaying multiple images using montage function
> Is it possible to add title to four images that are displayed using montage? No. Image data are combined into a single image...

6 years ago | 1

Answered
How to extract value from matrix and add a constant repeatedly?
Take the cumulative sum of y from right to left after adding 2 to the end: x = 2; % scalar y = [1 3 2 7 8]; % row vector z = ...

6 years ago | 0

| accepted

Answered
Question on how to delete the data (outliers) in the boxplot
> how to eliminate the representation of outliers in a boxplot representation. Removing outliers from the raw data By default,...

6 years ago | 2

| accepted

Answered
Creating a bar plot from a categorical subarray
idx = 7:10; bar(categorical(samples(idx)), rq(idx)) If you want to eliminate categories with a bar height of 0, idx = rq~=0...

6 years ago | 0

| accepted

Answered
How to incorporate multiple IF conditions to generate noisy data?
No need for a loop at all. noise = 1.5*(n>1) + -.5*(n<0) However, in your example, n is always between 0 and 1. Demo rn...

6 years ago | 0

| accepted

Answered
Mixed anova design function (unbalanced design)
Disclaimer: I'm not an expert in statistical test selection and have met very few experts on this matter. Test selection should...

6 years ago | 1

| accepted

Answered
How to plot the vector relative black point to red point
Your [x,y] coordinates are not paired so step 1 is to find the values in black ('k') that are closest to red ('r') (or vise vers...

6 years ago | 1

| accepted

Answered
Using dendrogram in App Designer
How to call an external plotting function without an axes argument in AppDesigner When calling an external plotting function fr...

6 years ago | 3

| accepted

Answered
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...

6 years ago | 0

Answered
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...

6 years ago | 1

Answered
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...

6 years ago | 1

| accepted

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

6 years ago | 1

| accepted

Answered
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 ...

6 years ago | 0

Answered
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...

6 years ago | 0

Answered
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...

6 years ago | 1

Answered
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...

6 years ago | 0

| accepted

Answered
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...

6 years ago | 1

| accepted

Answered
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...

6 years ago | 0

| accepted

Answered
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...

6 years ago | 4

| accepted

Answered
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...

6 years ago | 1

| accepted

Answered
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...

6 years ago | 1

| accepted

Answered
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...

6 years ago | 0

| accepted

Answered
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...

6 years ago | 0

Answered
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))

6 years ago | 1

Answered
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...

6 years ago | 0

| accepted

Answered
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...

6 years ago | 1

| accepted

Answered
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...

6 years ago | 1

| accepted

Answered
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" ...

6 years ago | 1

Answered
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...

6 years ago | 0

| accepted

Load more