Answered
Group data based on contiguous blocks of time
This transforms input table T to the start-end table Tnew. % Create input table T = table(duration(9,0,0)+seconds([0:3,25200...

6 years ago | 0

| accepted

Answered
Join multiple readtable data with WeirdDuration
In your formatSpec, formatSpec = '%*6s%13{hhmmss.SSSSSS}D%C%[^\n\r]'; note that you're using lower case hh which is for 12-ho...

6 years ago | 1

| accepted

Answered
Delete a specific shape of marker from a plot
delete(findobj(gca, 'Marker', '+'))

6 years ago | 1

| accepted

Answered
how to write superscripts for x-axis in a boxplot
set(gca,'TickLabelInterpreter','tex')

6 years ago | 1

| accepted

Answered
Speed up my Matlab Code
Just about every line can be improved. drawnow() is a major time killer. It updates all graphics objects that exist and you'...

6 years ago | 1

Answered
Offset ticks and gridlines
Assuming the grouped bars are centered at integer values along the x axis, the last line of code below places the x ticks at the...

6 years ago | 0

Answered
Plotting data in table after grouping
arrayfun() is one way to do that. tbl = table([1;1;1;2;2;2;2;3;3],[0;1;4;0;2;3;5;1;4],rand(9,1),'VariableNames',{'id','t','x'}...

6 years ago | 0

| accepted

Answered
How to edit the grid size in heatmap and how to make the color scale just a binary value?
"I have a heat map ... I want to make it look as continous plot as possible, ... I want to make it appear without individual gri...

6 years ago | 0

| accepted

Answered
How do i sum of columns cells where the other columns have equal rows?
B is the output matrix and requires exact matches (so if you're working with floating decimals, this simple approach will not wo...

6 years ago | 1

| accepted

Answered
Convert Nx1 matrix into a single number
Produce an input vector of 100 single digits A = randi(9,1,100); % 100 random integers 1:9 % Example: [5 9 2 9 ...

6 years ago | 1

Answered
Creating table with variable and row names
You're likely getting an error, Error using table The RowNames property must contain one name for each row in the table. It...

6 years ago | 2

| accepted

Answered
Calculating Discharge Over Multiple Years
The first 3 lines re-create the input matrix named m. See inline comments to understand the rest. It produces a table T summa...

6 years ago | 1

| accepted

Answered
need function 'bwlabel' but without image toolbox.Is there any option?
I recently had to solve this problem without Image Processing Toolbox but this solution will only work for vector inputs. % ve...

6 years ago | 1

Answered
How to add standard deviation to the boxplot?
I wouldn't call it bizarre. Often times it's useful to compare means/medians and IQR/std. It may reveal how skewed your data ar...

6 years ago | 0

Answered
how to reduce computation time for nested loops
Your loops sum to over 536.8 million iterations but due to the size of your variables (B has >268.4 million elements) the expans...

6 years ago | 0

| accepted

Answered
Find minimum value out of a 3D contour plot
Below is a simplification of your code. load('SUMMARY.mat') a = SUMMARY([1 10 19 28 37 46 55 64 73],1).'; % Simpler c = SUMMA...

6 years ago | 1

| accepted

Answered
A more convenient colormapping
You could replace pcolor() with contourf(). The plot below uses 12 levels of contours. You can play around with the number of l...

6 years ago | 0

| accepted

Answered
How to re-bin the 2D data?
You can use Y = discretize(X,edges) to bin the X data and use the bin index to group the Y data into bin categories. You probabl...

6 years ago | 2

| accepted

Answered
counting rows after fprintf
As dpb advised, you could use a counter. n = 15; counter = 0; for i = 3:n for j = 4:n for k = 5:n ...

6 years ago | 1

Answered
Highlighten specific x-axis values
"What I want to do is to plot my figure with its x-axis that ranges from 0 to 5 in steps of 0.5. Now I want to add 2 specific va...

6 years ago | 2

| accepted

Answered
How to run a custom command from a UI
Another approach is to write the set of commands to an m-file that can run as a script or a function and then you can call that ...

6 years ago | 0

| accepted

Answered
GUI stops after initialization code
The problem The "visible" property of your GUI figure was set to "off" which means the GUI was initialized properly, you just c...

6 years ago | 0

| accepted

Answered
AnnotationPane handle appearing in GUIDE GUIs with Panel-Axes in r2019b
Solution to editing the GUI in GUIDE When changing some properties of the GUI in GUIDE, an error dialog will appear preventing ...

6 years ago | 0

| accepted

Answered
Creating Library with App Designer
When comparing strings or char arrays, use strcmp() instead of A==B. Also, to combine conditions, use && as shown below. ...

6 years ago | 1

| accepted

Answered
changing titles for subplots in a for loop
Use sprintf() to define the subplot titles. titleRows = repmat([1;4;8;12],1,2).'; % x/D values titleCols = repmat([0.13, 0.8]...

6 years ago | 0

| accepted

Answered
3D point clouds with variable marker transparency, color and size
"I would like to make 3D point clouds in which the markers have variable color, transparency and/or marker size. " I suggest us...

6 years ago | 1

Answered
Displaying the name of a trace in plot() in a data tip
Use dataTipTextRow(label,value) to add a new row to the datatip of each line object. The best way to organize this is to assign...

6 years ago | 6

| accepted

Answered
Saving and loading variables to matfile in appdesigner
It appears that "GlodSlider" is a UI object that you're saving to a mat file. The better approach is to save the Value of that...

6 years ago | 1

| accepted

Answered
Why doesn't Timetable command accept my time,data input?
The error message tells you what's wrong. "Provide datetime or duration vector for row times to create timetable." Apparently...

6 years ago | 1

| accepted

Answered
plotting data on a refresh rate
Somewhere in your code a figure is being generated explicitly, perhaps with the figure() command. That needs to be removed. To...

6 years ago | 0

Load more