Answered
For-Loop for multiple plots or histograms
Put the data into a cell array and then loop through the cell array. figure tlo = tiledlayout (1,3); data = {SPNL, EXNL, NKN...

5 years ago | 0

| accepted

Answered
Find minimum of single-variable function
Hint: [x,fval] = fminbnd(___) gives you the (x,y) values at the minimum. You could plug the x values into both of your optio...

5 years ago | 0

Answered
error messeges in MATLAB app designer
There isn't a pretty solution and there is no solution that doesn't involve touching the code itself. I've often wished there w...

5 years ago | 1

Answered
How to select different indices for each column in an array
Check out sub2ind.

5 years ago | 0

Answered
Generating a range of curves that fit inside a set of fixed limits
1. A sophisticated way would be to fit the curve, perhaps to a sigmoid or logistic fcn, and then adjust the fit parameters to pr...

5 years ago | 0

Answered
How can I change the line color in an 'animatedline' plot in a manner that scales with one of the variables?
There are other ways to create animation. You can segement the line and conrol the color of each segment (see "segmentation de...

5 years ago | 0

| accepted

Answered
Issues with labelling bar graph along the x axis?
This shows how to convert a numeric vector to x tick labels. It includes an assertion that will throw an error if the number o...

5 years ago | 0

| accepted

Answered
comparing categorical arrays in terms of content
ismember alone can answer the first point (common elements of A and B) but not the 2nd since it only tests whether elements of A...

5 years ago | 1

| accepted

Answered
UIAxes plot vs Axes plot in App
> Are there any advantages in creating separate plots in UIFigure and UIAxes, versus figure and axes? My opinion: If your exis...

5 years ago | 1

| accepted

Answered
How to normalize a discrete signal?
Audio data are typically already normalized between [-1,1]. Are you getting values outside of that range? min(y) max(y) Anyw...

5 years ago | 0

| accepted

Answered
Subtracting XYZ coordinates defined by matrices
I think what you're asking is how to remove rows of A that are nearly equal to rows of B. Removal is different from subtraction...

5 years ago | 0

| accepted

Answered
Writing the built in matlab function in simple code(like for loop, etc.)
You can use implicit expansion which is supported in Matlab r2016b and later (more info). y=[1 2 3 4]; OccurancesParameter= 5...

5 years ago | 0

Answered
How can I find the max value and location within a matrix
[maxval, idx] = max(M);

5 years ago | 1

Answered
Find ascii numbers from cells
Matlab stores characters as Unicode characters which incorporates the ASCII character set as the first 128 sumbols. Convert c...

5 years ago | 1

| accepted

Answered
Plotting a smooth curve from points
You could add values to the beginning and end to make the curve continuing in both directions. The example below uses hard-coded...

5 years ago | 2

Answered
How to formulate elegantly and performant functions that depend on a lot of input variables
A set of inputs like the example you shared is not inelegent. Some may argue that it's more elegant than the alternatives. Wha...

5 years ago | 0

| accepted

Answered
how do correct the error in this line? print is nor recognised
"Print" is not a name-value option for that function. I think you're looking for, X1fit = estimate(modelX, Xest(:,1),'Display...

5 years ago | 0

| accepted

Answered
Size issue in Matlab App Designer
If you want more flexibility over how your app automatically resizes, use Grid Layout Managers or the auto-reflow options in App...

5 years ago | 0

Answered
How do I replace elements of an array with letters?
Sounds like you're describing this, number_cycles = 10; labels_I03 = categorical(repmat({'N'},1,number_cycles)); % set all as...

5 years ago | 0

| accepted

Answered
Manipulate amplitude without using linspace
Since square returns values in the range of [-1,1], rescaling to [-2,1] is as easy as multiplying by 1.5 and subtracting 0.5 whi...

5 years ago | 1

| accepted

Answered
setting axis ticks on heatmap
If you want to change the tick labels, h = heatmap(__); h.XDisplayLabels = % string array or cell array of character vectors ...

5 years ago | 0

| accepted

Submitted


Draw randomly centered circles of various sizes
Set the range of radii, density, and other parameters to create a plot that draws randomly centered polygons with or without ove...

5 years ago | 4 downloads |

5.0 / 5
Thumbnail

Answered
generating random , non uniform fiber distribution of circle in square
Using bubblebath() from the file exchange (see another demo here), figure('Color','w') ax = axes(); axis off S.axisHandle...

5 years ago | 0

| accepted

Answered
Remove duplicate rows in table
Follow the demo. T is a table T.Test contains the test names which can be strings, character vectors, categoricals, or numeric...

5 years ago | 0

| accepted

Answered
Why is one of my tiled plots not being displayed? MATLAB UI App Designer
plot(ax4,theta(1:length(theta)-3),jerk,'c') % ^^^ you forgot this part

5 years ago | 1

| accepted

Answered
How do I measure density of random point with a fixed area in MATLAB?
Use histogram2() or histcounts2() to compute 2D density. Demo: xy = randi(400,50,2); subplot(1,2,1) plot(xy(:,1), xy(:,2),...

5 years ago | 1

| accepted

Answered
Creating matric of multiple arrays
Perhaps this (scroll down to see vectorized version)? x=0:12; k=5; a=k+x; b=k+2*x; c=k+4*x; d=k*x; Z = nan(2,2,numel(...

5 years ago | 1

Answered
Butterworth filter design calls bilinear and fails
You likely had another file on your Matlab path with the same name as butter. If the error happens again, the following command...

5 years ago | 1

| accepted

Answered
Generate a geographical heat map
I think this is what you're looking for. heatmap Note the change in inputs from matrix to vector of unique values. rng('def...

5 years ago | 2

| accepted

Answered
creating one output and 2 inputs function in script file
> Write a function in a scirpt file that has two inputs: a scalar z and the matrix M, hence y =f(z,M) Hint: z is not scalar in ...

5 years ago | 0

| accepted

Load more