Answered
Create a plot for local max peaks given a certain time range.
It's unclear what some of your variables are and how they relate to each other. For example, what's the second row of y? How d...

6 years ago | 0

Answered
Patch plot z-values colorbar not correct
There are several issues to cover. 1) If you want to use 1 colorbar to represent all subplots, all subplots must have the same...

6 years ago | 0

| accepted

Answered
How can I delete an entire row/element of a matrix/array and also delete the same row/element from another matrix/array?
Since the column vectors should be the same length, I recommend you combine them into a matrix (shown below) or a table. m = [...

6 years ago | 0

| accepted

Answered
scroll programmatically within uitable
A function (findjobj) on the file exchange supports programmatic scrolling on uitables when the uitable is embedded in a regular...

6 years ago | 1

| accepted

Answered
How to get numbers from char array?
Assuming your string is named, str, str = '@(S)sigmoid(S,-1.588276e+00,-2.598747e-01)'; numstr = regexp(str,'(-)?\d+(\.\d+)?(...

6 years ago | 1

| accepted

Answered
populate a listbox with selected folder doc file names - App designer
Give this a shot, docFileInfo = dir(fullfile(app.selectedPath, '*.doc')); app.docListBox.Items = {docFileInfo.name}';

6 years ago | 1

| accepted

Answered
How to convert categorical data to numeric in separate columns?
Here's a more efficient solution. % Create demo data location = categorical({'Asia','US','Asia','Africa','Africa','US','US','...

6 years ago | 0

Answered
How can I plot and reach to this figure ?
I'm not going to do your work for you but I can give you some hints that will get you started. If you are unfamiliar with a func...

6 years ago | 0

Answered
how to add a normal distribution to a figure?
You can use this fully parameterized guassian function explained here https://www.mathworks.com/matlabcentral/answers/370386-ho...

6 years ago | 1

Answered
"Index esceeds the number of array elements (1)". When clearly there is capacity for 201 spaces in the array, what is happening!?
"Index esceeds the number of array elements (1)". When clearly there is capacity for 201 spaces in the array, what is happening!...

6 years ago | 1

| accepted

Answered
I'd like to plot color image histograms that combine color as RGB
By setting transparency to a value less than 1, overlapping histograms will show the combined colors. However, since the histog...

6 years ago | 0

Answered
Why is it that the breakpoint does not work?
First, make sure the breakpoint is valid. Invalid break points are gray, valid break points are red. For more info, see "invali...

6 years ago | 0

| accepted

Answered
how to plot 2 curve with together
The code results in the error, Error using * Incorrect dimensions for matrix multiplication. Check that the number of column...

6 years ago | 1

Answered
How can I make the plot transparent in a gscattter?
Setting transparency of markers with gscatter is not possible as of r2020a. Update: See Yair's method of setting gscatter mar...

6 years ago | 1

| accepted

Answered
How to concatenate a row of variable names and a double?
You can concatenate them within a cell array. Based on your question and title, I'm guessing you've got a row of variable names...

6 years ago | 0

Answered
Linking x and y axis zoom in subplot
See linkprop() Link the xlim and ylim properties. Or use or linkaxes() Here's a demo. It uses tiledlayout instead of subpl...

6 years ago | 0

Answered
how to label strings in an array with an ID
See ismember() StringID needs to be a cell array. Then, [~, idx] = ismember(tc,StringID(:,1)); Also see lower() if you want...

6 years ago | 0

| accepted

Answered
Count the number of indices between two indices
If and only if the following rules are met, the solution is very simple. For every "1" there will be a "-1" and for every "-1"...

6 years ago | 0

| accepted

Answered
Difference between %d and %f?
Refer to the documentation. %d represents signed integers (base 10). sprintf('John is %d years old', 7) % 'John is 7 year...

6 years ago | 13

| accepted

Answered
Calculating mean and SD of histogram
Guessing that column 1 of the data are x-values to the bar plot and column 2 of the data are the bar heights, you can fit a guas...

6 years ago | 1

Answered
Drawing a rectangle over existing plot
To use an annotation object in the way you're describing, you'd need to convert the data units, which are relative to the axes, ...

6 years ago | 2

| accepted

Answered
Two x-axis for the same contourf plot
Matab does not currently offer a second x axis. You can create two duplicate axes and place the x-ticks of the bottom axis on ...

6 years ago | 0

| accepted

Answered
String scalar or character vector must have valid interpreter syntax
You probably want something like title(sprintf('%.2f + %.2f', Rs(1), Ry(1))) See sprintf for more info. Update Set interpre...

6 years ago | 0

| accepted

Answered
calculation time in for loop
If the computations done within the loops are nearly uniform in their complexity, then it's expected that the speed of each loop...

6 years ago | 0

| accepted

Answered
Error using fprintf Invalid file identifier. Use fopen to generate a valid file indetifier
My guess is that Total_Time_t2_64Mb is equal to NaN which would result in s2 = "TOTAL FRAMES SENT = " + NaN +...

6 years ago | 0

| accepted

Answered
Labels to a stacked bar
Here's a demo. % Create stacked bar plot x = randi(3,20,5); h = bar(x,'stacked'); % Get the (x,y) coordinates for the t...

6 years ago | 0

| accepted

Answered
Unnecessary rounding when reading an xlsx
Thanks for providing the raw data. I'm not seeing what you're seeing. My data exporation steps are below. % Read-in the da...

6 years ago | 0

| accepted

Answered
Finding handles to ROI objects such as drawline
h = findobj(axhl, 'type', 'images.roi.line'); The object created by drawline is different from regular line objects. But the...

6 years ago | 0

| accepted

Answered
Index in position 1 exceeds array bounds (must not exceed 46)
The value of n iterates from 1 to 617. The size of D is 46x16. When n=47, you get the error because D(47,:) doesn't exist. ...

6 years ago | 0

Answered
Error in callback function execution in App Designer when called programmatically
As of r2020a, the typical ToolBar is not (yet?) supported for UIFigures (eg, apps) but the property exists which usually means t...

6 years ago | 0

| accepted

Load more