Answered
is there an alternative to pdist2 that calculates the distance between a matrices with different column numbers
You just need to transpose B d = pdist2(A, B'); d(i,j) is the distance between A(i,:) and B(:,j).

6 years ago | 2

| accepted

Answered
How to plot my "real-time" graphic in GUI?
The problem is not clear. Initially it sounds like you're asking for help using a PressButton function but that function isn't ...

6 years ago | 0

Answered
Vectorization and plotting user-defined function
To evaluate the integrals at each value in r, x = arrayfun(f,r);

6 years ago | 1

| accepted

Answered
how to solve multiple equations that use the same variable but different values
The goal is not clear but it seems like the question can be answered by indexing c. c = [3, 10] v(1) = (4*c(1) +150)/2; v(2)...

6 years ago | 0

Answered
How to reproduce original matrix, after deleting zeros from matrix for computations
Option 1. Replace the 0s with NaN values instead of removing them. Most Matlab functions either ignore NaN values or have flags...

6 years ago | 1

| accepted

Answered
How to define transparency of errorbar?
See this answer: https://www.mathworks.com/matlabcentral/answers/473325-how-to-make-errorbar-transparent#answer_489337

6 years ago | 0

Answered
How to make errorbar transparent?
Unlike many line plots, the color property cannot be used to set transparency in errorbar(). Transparency can be set from with...

6 years ago | 1

| accepted

Answered
How to copy a part of characters from each cell to a new matrix?
If you expect all elements of the cell array to have exactly the same format within the parentheses, ([number]°|[number]TM°) ...

6 years ago | 0

Answered
How can I set one lsline using gscatter?
Use coeffs = polyfit(x,y,1) to compute the regression line for all of the data and then refline(coeffs) to plot the regression l...

6 years ago | 0

| accepted

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

Load more