Answered
splitapply help with logicals
groupsummary() does that but in a different format. Demo T = table(categorical({'Y';'N';'N';'Y';'Y'}),... categorical({'F...

6 years ago | 0

| accepted

Answered
How to manipulate text in uitable?
Three methods of centering data containing strings and numbers within a uitable column and setting the format of the numbers for...

6 years ago | 0

| accepted

Answered
Stacked Bar chart using structure, displaying putting values on each bar
To control the color of each segment, set FaceColor to Flat and use any colormap (from this answer). Use text() and cumsum() ...

6 years ago | 0

| accepted

Answered
Creating Violin Plots how to reorder categories in custom order.
Use B = reordercats(A,neworder) to change the order of your categorical variables. Use C = categories(A) to see the current c...

6 years ago | 0

| accepted

Answered
I am trying to plot but I am getting an empty figure
There are two problems. When you're plotting only 1 coordinate at a time, specify a marker type. You need to apply "hold on"...

6 years ago | 0

| accepted

Answered
How to display text in a plot as scientific number
n = 0.00000542; nStr = num2str(n, '%.2e'); cla() text(.1, .1, nStr) % alternatively, text(.5, .1, sprintf('%.2e', n)...

6 years ago | 0

Answered
Create gif from images in matlab
Mathworks' demo: https://www.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-images-in-matlab https://...

6 years ago | 2

| accepted

Answered
How to find error between predicted and actual data ?
Use predict(grpModel, x) to get the predicted response. x should be the x values of your training data. Then just subtract the...

6 years ago | 0

Answered
How to extract the values of x and y from this matlab regression models?
Step 1) Access the (x,y) coordinates that are plotted within the Regression Learner App. If you can't extract the data directly...

6 years ago | 0

| accepted

Answered
Control the color of characters' inside separately from their contour (text function)
No, there is no text-edge property. You can change the background color ('BackgroundColor') of the rectangle that frames the ...

6 years ago | 3

| accepted

Answered
Percentage increase for table variables
If I'm understanding the problem correctly, the result would be an 6x17 matrix "M" where % P is the 6x18 input table converted ...

6 years ago | 0

| accepted

Answered
Repetitive values for x axis
One way to plot 3 lines that share x-coordinates is to plot the lines individually. That's shown in the first subplot below. ...

6 years ago | 1

| accepted

Answered
How to get subscripts in the legend of a Nichols plot?
This is caused by an extra excape character added when the legend is initially created. Details are explained by these two ans...

6 years ago | 0

| accepted

Answered
Coder Structure element Size Mismatch error during subscripting
Impnse.isOut(idx,:) = memfcn(1:size(Impnse.f(:,idx),1),locs); % ^^^^^ This is matrix indexing 101 and it's a rudime...

6 years ago | 0

| accepted

Answered
Scatterhistogram y axis squished
The variable name is throwing me off. In your previous comments, age_date is a table with a last_week_day column which is date...

6 years ago | 0

| accepted

Answered
Make a Table in UIAxes
Hm, that should throw an error (but I see that it doesn't). The uitable should be a child of a "Figure object (default) | Pan...

6 years ago | 0

| accepted

Answered
Create table in loop
1. Store the values within the loop and build the table later Unless you're already working with table variables, it probably e...

6 years ago | 5

Answered
How could I adjust the color of multiple lines within a graph, without using the default matlab color code?
Here are two demos covering two different methods. Patch demo Here's a demo using patch() to vary the color of a line. Ea...

6 years ago | 2

| accepted

Answered
boxplot with descending median
Use the sort index to change the order of columns in your data. % Create demo data rng('default') data = rand(8376, 35).*rand...

6 years ago | 0

| accepted

Answered
How do I increase X-axis tick marks to include every year in the data?
Here's a demo you can apply to your data. It sets the x-tick values to January 1st of each year spanning the range of dates in y...

6 years ago | 0

Answered
How to subtract wind direction between 0-359 degrees?
If you're frequently working with circular value, I recommend using the Circular Statistics Toolbox from the file exchange. F...

6 years ago | 0

| accepted

Answered
pause function gives inconsistent timing when used inside a loop.
Careful using tic/toc. As summarized in the documentation, "If your code is faster than 1/10 second, consider measuring it runn...

6 years ago | 1

| accepted

Answered
Why after programming the coeff of the dataset, I get only part of the coeff of the dataset?
From the documentation: coeff = pca(X) returns the principal component coefficients, also known as loadings, for the n-by-p dat...

6 years ago | 0

| accepted

Answered
How to designate color in contour plot with specific values
Here's a demo. Produce the contour plot. Set the binaryThreshold variable that defines the border of white/black Redefine t...

6 years ago | 0

| accepted

Answered
How to set a fix aspect ratio in app designer plots
axis(app.UIAxes, 'equal')

6 years ago | 1

| accepted

Answered
Removing empty cells with non-zero dimensions
How to remove empty cells To remove all empty cells in the 2nd layer of a nested cell array named X, for i = 1:numel(X) ...

6 years ago | 0

| accepted

Answered
Removing columns if single value is more than threshold
" I would like to remove whole columns, if any value is for example 10% greater or less than row average" Demo: % Create 100x1...

6 years ago | 0

| accepted

Answered
Theta marked in radians for ezpolar?
polarplot uses polaraxes whereas expolar creates a pseudo-polar-plot on regular Cartesian axes. The ThetaAxisUnits property is ...

6 years ago | 0

| accepted

Answered
selection of 4 consecutive rows from a matrix randomly
Select a random integer from 1 to n-j+1 where n is the number of rows and j is the number of consecutive rows to select. m = ...

6 years ago | 0

Answered
App Designer terminate an execution of a function
Since Matlab does not have a "kill all tasks" command, you can continuously check the value of a flag within the function and st...

6 years ago | 1

| accepted

Load more