A répondu

Compare two matrices and select max one based on the a column

If I understood correctly: C = A; replacebyB = B(:, end) > A(:, end); C(replacebyB, :) = B(replacebyB, :); The above gives p...

Compare two matrices and select max one based on the a column

If I understood correctly: C = A; replacebyB = B(:, end) > A(:, end); C(replacebyB, :) = B(replacebyB, :); The above gives p...

presque 3 ans il y a | 0

| A accepté

A répondu

Code To Extract Data From .txt File to Excel

As we don't yet know how to identify the files to be processed, nor how exactly the data is to be exported to excel, the below j...

Code To Extract Data From .txt File to Excel

As we don't yet know how to identify the files to be processed, nor how exactly the data is to be exported to excel, the below j...

presque 3 ans il y a | 0

| A accepté

A répondu

From excel link to time table

First note that urlread has been deprecated for a while. Its replacement is webread which is more powerful. webread would have ...

From excel link to time table

First note that urlread has been deprecated for a while. Its replacement is webread which is more powerful. webread would have ...

presque 3 ans il y a | 0

| A accepté

A répondu

Editing a Tall table and writing it into a csv file

"It is actually the exact same size" If I recall correctly, you do indeed get some misleading error messages when you try to co...

Editing a Tall table and writing it into a csv file

"It is actually the exact same size" If I recall correctly, you do indeed get some misleading error messages when you try to co...

presque 3 ans il y a | 0

A répondu

remove rows in matrix if it is repeated 2 times

The whole thing is unnecessarily complicated. A = {[1,6,3,2],[3,6,5]}; A1 = unique([A{:}]); B = [1 2; 1 6; 2 3; 3 5; 3 6; 5 6...

remove rows in matrix if it is repeated 2 times

The whole thing is unnecessarily complicated. A = {[1,6,3,2],[3,6,5]}; A1 = unique([A{:}]); B = [1 2; 1 6; 2 3; 3 5; 3 6; 5 6...

presque 3 ans il y a | 0

| A accepté

A répondu

Finding multiple mean values of matric

If the height of your matrix is a multiple of 50 elements: Simply reshape the column in rows of 50 elements and take the mean ac...

Finding multiple mean values of matric

If the height of your matrix is a multiple of 50 elements: Simply reshape the column in rows of 50 elements and take the mean ac...

presque 3 ans il y a | 0

A répondu

Repeating for loop until getting a list of solution

If it's a flow chart you've been given, then you are entitled to complain loudly. That flow chart is very misleading. The layout...

Repeating for loop until getting a list of solution

If it's a flow chart you've been given, then you are entitled to complain loudly. That flow chart is very misleading. The layout...

presque 3 ans il y a | 0

A répondu

Warning about array when use loadlibrary function

Note that you get a warning, not an error. However, the warning is correct in that it's not possible to fill that structure in m...

Warning about array when use loadlibrary function

Note that you get a warning, not an error. However, the warning is correct in that it's not possible to fill that structure in m...

presque 3 ans il y a | 0

A répondu

How to find an exact string match in a list of folder names

It's simple to solve: rather than testing first for 'X' then 'Y' then 'XY', test first for 'XY' then 'X' or 'Y' then the other. ...

How to find an exact string match in a list of folder names

It's simple to solve: rather than testing first for 'X' then 'Y' then 'XY', test first for 'XY' then 'X' or 'Y' then the other. ...

presque 3 ans il y a | 0

| A accepté

A répondu

Index in position 2 exceeds array bounds

The error message is clear, you're using an index greater than the size of the 2nd dimension of an array. The only indexed array...

Index in position 2 exceeds array bounds

The error message is clear, you're using an index greater than the size of the 2nd dimension of an array. The only indexed array...

presque 3 ans il y a | 0

A répondu

Calllib function error using with struct array

It's a slightly different procedure for passing structures between matlab and a C library. Internally, matlab structures are ver...

Calllib function error using with struct array

It's a slightly different procedure for passing structures between matlab and a C library. Internally, matlab structures are ver...

presque 3 ans il y a | 0

A répondu

Extract data from all values of a containers.Map collection

This doesn't involve any loop, either explicit or via any of the ***fun functions. However all the structures in the map must ha...

Extract data from all values of a containers.Map collection

This doesn't involve any loop, either explicit or via any of the ***fun functions. However all the structures in the map must ha...

presque 3 ans il y a | 0

| A accepté

A répondu

average each block of class in a matrix

It's unclear how your input data is actually stored in matlab so please clarify if the below doesn't apply. I'm assuming that y...

average each block of class in a matrix

It's unclear how your input data is actually stored in matlab so please clarify if the below doesn't apply. I'm assuming that y...

presque 3 ans il y a | 0

| A accepté

A répondu

accidentally changing built-in code from checking it by clicking on the error line

You would have to save the file before matlab sees the changes. Additionally, on Windows if you haven't messed up with the defau...

accidentally changing built-in code from checking it by clicking on the error line

You would have to save the file before matlab sees the changes. Additionally, on Windows if you haven't messed up with the defau...

presque 3 ans il y a | 1

| A accepté

A répondu

datasample/bootstrap procedure

In the following, I'm assuming that residuals and carhartt are both matrices. It looks like they are from your code. If not the ...

datasample/bootstrap procedure

In the following, I'm assuming that residuals and carhartt are both matrices. It looks like they are from your code. If not the ...

presque 3 ans il y a | 0

| A accepté

A répondu

How to convert time into nearest hour and to do interpolation of NaN values extracted from .csv file?

Here's how I'd import your data. opts = detectImportOptions('see.csv'); %let matlab figure out the format of the file. opts ...

How to convert time into nearest hour and to do interpolation of NaN values extracted from .csv file?

Here's how I'd import your data. opts = detectImportOptions('see.csv'); %let matlab figure out the format of the file. opts ...

presque 3 ans il y a | 1

| A accepté

A répondu

set class property only once

It sounds like you want a singleton property. This is how I'd designed it. As commented in Steven's answer, this doesn't and sho...

set class property only once

It sounds like you want a singleton property. This is how I'd designed it. As commented in Steven's answer, this doesn't and sho...

presque 3 ans il y a | 1

| A accepté

A répondu

Making a group of maximum nearest elements.

Be aware that the following creates a temporary matrix of size numel(A) x numel(B), so if both vectors are very large you may ru...

Making a group of maximum nearest elements.

Be aware that the following creates a temporary matrix of size numel(A) x numel(B), so if both vectors are very large you may ru...

presque 3 ans il y a | 0

| A accepté

A répondu

time align two files

In your example, what you're asking is simply: M(P(:, 2) ~= 1, :) = [] %remove all rows of M for which the corresponding row o...

time align two files

In your example, what you're asking is simply: M(P(:, 2) ~= 1, :) = [] %remove all rows of M for which the corresponding row o...

presque 3 ans il y a | 0

| A accepté

A répondu

How two fuse two sets of images?

Step 1: Download Stephen's natsortfiles. Then adapt as needed. I still don't know what you want as output. I assume new images ...

How two fuse two sets of images?

Step 1: Download Stephen's natsortfiles. Then adapt as needed. I still don't know what you want as output. I assume new images ...

presque 3 ans il y a | 0

| A accepté

A répondu

readtable() interpreting HEX as scientific

In recent versions of matlab, the easiest would be to use detectImportOptions and override the relevant variable type to force i...

readtable() interpreting HEX as scientific

In recent versions of matlab, the easiest would be to use detectImportOptions and override the relevant variable type to force i...

presque 3 ans il y a | 2

| A accepté

A répondu

Error with Set function when I am trying to change the Xlabel form a figure (Unable to use a value of type matlab.ui.Figure as an index.)

Rather than giving us a screenshot of the code, which we can't copy and edit, paste your code directly in your question. Also it...

Error with Set function when I am trying to change the Xlabel form a figure (Unable to use a value of type matlab.ui.Figure as an index.)

Rather than giving us a screenshot of the code, which we can't copy and edit, paste your code directly in your question. Also it...

presque 3 ans il y a | 0

| A accepté

A répondu

How to compare two excels for matches and differences row by row in Matlab?

allrows = readmatrix('your1stexcelfile'); %readmatrix requires R2019a or later singlerow = readmatrix('your2ndexcelfile'); ...

How to compare two excels for matches and differences row by row in Matlab?

allrows = readmatrix('your1stexcelfile'); %readmatrix requires R2019a or later singlerow = readmatrix('your2ndexcelfile'); ...

presque 3 ans il y a | 1

A répondu

can someone suggest to make this code faster

If I understood correctly: pixels_dayofyear = load('all_doy.mat'); pixels_temperature = load('all_variable.mat'); assert(iseq...

can someone suggest to make this code faster

If I understood correctly: pixels_dayofyear = load('all_doy.mat'); pixels_temperature = load('all_variable.mat'); assert(iseq...

presque 3 ans il y a | 0

| A accepté

A répondu

Help when trying to exclude matrix values while indexing!

"the second (II) does not and returns a NaN value" Firstly, find never returns NaN. It can return an empty array, this is not t...

Help when trying to exclude matrix values while indexing!

"the second (II) does not and returns a NaN value" Firstly, find never returns NaN. It can return an empty array, this is not t...

presque 3 ans il y a | 0

A répondu

Customize how my class is displayed as a property of any other class.

"I can make my class inherit from your mentioned parent classes, but i cannot view those classes.. so there is no way of finding...

Customize how my class is displayed as a property of any other class.

"I can make my class inherit from your mentioned parent classes, but i cannot view those classes.. so there is no way of finding...

presque 3 ans il y a | 1

A répondu

How to assign a column of text string to another variable?

A = repmat('test', 5,1); replicates the 1x4 char array 'test' 5 times along the rows, resulting in a 5x4 matrix of 20 character...

How to assign a column of text string to another variable?

A = repmat('test', 5,1); replicates the 1x4 char array 'test' 5 times along the rows, resulting in a 5x4 matrix of 20 character...

presque 3 ans il y a | 0

| A accepté

A répondu

how to make a response for more than one period?

Your question is still very unclear. I think you're saying that in another function you've got a loop that calls your function ...

how to make a response for more than one period?

Your question is still very unclear. I think you're saying that in another function you've got a loop that calls your function ...

presque 3 ans il y a | 0

| A accepté

A répondu

Can I import dynamic data from a private server into Matlab?

How easy this is to do is going to depend on the server (how it is implemented). You would use one of webread, webwrite or websa...

Can I import dynamic data from a private server into Matlab?

How easy this is to do is going to depend on the server (how it is implemented). You would use one of webread, webwrite or websa...

presque 3 ans il y a | 1

A répondu

how to separate a matrix according to class labels?

classmatrices = splitapply(@(rows) {yourmatrix(rows, :)}, (1:size(yourmatrix, 1)'), yourmatrix(:, 3)) is one way. Note that in ...

how to separate a matrix according to class labels?

classmatrices = splitapply(@(rows) {yourmatrix(rows, :)}, (1:size(yourmatrix, 1)'), yourmatrix(:, 3)) is one way. Note that in ...

presque 3 ans il y a | 1