Answered
How to plot already binned data
heatmap plots are difficult to customize which is why I recommend using imagesc or histogram2. This expample below uses histog...

5 years ago | 1

| accepted

Answered
Curve fitting one portion of the data
The goal is to remove the linear part so you need to find when the linear part ends and the curvilinear part begins. There are ...

5 years ago | 1

| accepted

Answered
Polarhistogram changing rlim creates blue circle
rlim() is behaving as expected. The reason you're seeing the additional blue historgrams is because unlike ylim in Cartesian ...

5 years ago | 2

| accepted

Answered
Plot not showing any data
The solution involves matlab indexing which is a very basic skill to know before making much progress. This should get you sta...

5 years ago | 1

| accepted

Answered
dragging a selected point within uiaxes
HandleVisibility is set to off by default with uifigures and this prevents gcf/gca/gco from accessing the figure handle or anyth...

5 years ago | 0

| accepted

Answered
Cant join 2 tables with same headers. vertcat error
The error is because of a difference in character length of the two "name" fields. Vertical concatenation of characters into a ...

5 years ago | 1

Answered
Using pause() and readframe() - the pause is not affecting the output
getframe and writeVideo merely store images as frames of a movie which does not affect playback speed. Follow Walter Roberson...

5 years ago | 0

| accepted

Answered
Appdesigner create loop for drop down Items
See inline comments for instructions Option 1) Switch case A = [app.ColourDropDown_1 app.ColourDropDown_2 app.ColourDropDown_3...

5 years ago | 0

| accepted

Answered
How to write Latex in GUI's label?
From the startup function of your app, set the Edit Field Label's interpreter property to latex. You may need to reassign the s...

5 years ago | 0

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

Load more