Answered
Too many input arguments for Max function in 2018b
The linear option in r2019b [M,I] = max(A,[],___,'linear') was not included in r2018b. For r2018b you can use, [E, i] = max(A...

6 years ago | 0

| accepted

Answered
Distance between bounding corners
You could probably achieve the same results using regionprops from the Image Processing Toolbox (see BoundingBox property). In e...

6 years ago | 0

Answered
Calculating group statistics using frequency weights
Since you integer weights are much too large to merely replicate values based on the weights, you can scale your data according ...

6 years ago | 0

Answered
Is there a function alternative to get array/matrix/cell elements?
Matlab does not have offer that syntax. Here's a simple way to use a pair of anonymous functions to achive that. % Define t...

6 years ago | 1

Answered
get the location of points in a plot by mouse interaction in app designer
That call back function in that answer uses fprintf() to display the results in the command window. To display the results as te...

6 years ago | 0

Answered
Problem with a yyaxis plot
You're missing a semicolon x = linspace(0,25); y = sin(x/2); yyaxis left; plot(x,y); % h...

6 years ago | 0

| accepted

Answered
How to remove elements from the vector while we save the index of those removed elements?
I'll admit to still not fully comprehending the problem though that fault may be on my end. From what I understand you want to ...

6 years ago | 0

Answered
Error using nanstd function
If you're computing the std over all elements of X, this works in any release. B = std(X(~isnan(X)));

6 years ago | 0

| accepted

Answered
Changing the properties of a heatmap title
Matlab's heatmap() function (released 2017a) is notoriously difficult to customize. The handles to the title and axis labels a...

6 years ago | 2

| accepted

Answered
average between files with cell array of doubles
I'm assuming you're want to average element-wise across the rows of data. If this doesn't suit your needs, please let me know w...

6 years ago | 1

| accepted

Answered
how to run a 3x3 matrix through a for loop and save all instances of the [3x3]
A is a cell array the same size as t where A{n} is the matrix for t(n). omega = 1; phi = 1; t = linspace(0,5,300); A = arr...

6 years ago | 0

| accepted

Answered
if statement with multiple conditions within cells
Some of your question required interpretation. See the inline comments below and follow along line-by-line to understand how I ...

6 years ago | 0

| accepted

Answered
Issues with Legend Creating and Placement
Use str = compose(formatSpec,A); requires Matlab >= r2016b lgds = compose('Up to n = %i',n);

6 years ago | 1

| accepted

Answered
Replace value with another value
M(M==-1) = 0.1;

6 years ago | 4

Answered
Application Compiler One or More feature 'MRC' resulted in Error
When I copy your code into an m file, I instantly see an error at this line. I assume you're getting that error, too. functio...

6 years ago | 0

| accepted

Answered
Displaying matrix of correlation coefficients
I'm not aware of a Matlab function that produces such a plot, It appears that the circles are scaled by color and size. This...

6 years ago | 1

| accepted

Answered
how can i stack different values on one axis?
"I'm really looking for one easy function" plot(X,Y) does that where each column of inputs produces a line. Here's a demo. x...

6 years ago | 0

Answered
Z must be at least a 2x2 matrix
In this line below from your code, T(X,Y) must be at lease a 2x2 matrix and it apparently is not. contour(X,Y,T(X,Y),10,'Show...

6 years ago | 0

| accepted

Answered
How can I move the vertical line in an axes by a slider within a GUI?
Instead of drawing a new line using vline(), draw the line just once and then use the line handle to update its positoin within ...

6 years ago | 1

| accepted

Answered
How do I add an array to a table?
If you're adding a new column of data to an existing table, the column must have an equal number of elements as all other column...

6 years ago | 0

| accepted

Answered
Find timeseries mean for 10 years
Assuming you have a vector named temperature that stores the temperatures and a vector named dt that stores the datetime stamps ...

6 years ago | 0

| accepted

Answered
Check if connect 4 occurs in matrix
It's a little tricky to find a vector within a matrix when the dimensions of the matrix are all larger than the vector. I'm con...

6 years ago | 1

Answered
Reorder table columns names
Hint: [~, newOrder] = ismember(T1.Properties.VariableNames,T2.Properties.VariableNames); Or, as Steven Lord points out in...

6 years ago | 1

| accepted

Answered
How to add plot points in my map?
"...how can I add the latitude and longitude of each station on my code" Since you are using the shaperead argument pair {'UseG...

6 years ago | 1

| accepted

Answered
Kruskal Wallace Test on Column
The p = kruskalwallis(x) test works on columns of x. If all of your tables have the same number of rows, you just have to extra...

6 years ago | 1

Answered
How do I display two separate tables with 2 column headings the same side-by-side?
First you need to pad the shorter table so it matches the same number of rows as the longer table. The two decisions you need t...

6 years ago | 2

| accepted

Answered
Display only timeseries years
Based on the image you shared, your data are arranged in a table, not a timetable. Using a timetable will be useful so you can ...

6 years ago | 0

| accepted

Answered
when use online matlab how can I translate my result to my computer
You can save variables and figures using the standard save-commands. Those files will be saved to your Matlab-drive where you c...

6 years ago | 1

| accepted

Answered
How to extract component of vector from a struct with fields across each field
To extract all element from the DisplAtReferenceTemperature fields, add square brackets (or curley brackets to store values in ...

6 years ago | 1

| accepted

Answered
Making a histogram with two variables in the same graph
% create z1 and z2 values z1 = rand(1,1000)*7000 + 12000; z2 = rand(1,1000)*7000 + 12000; % bin and plot binEdges = 12000:...

6 years ago | 0

| accepted

Load more