Answered
Matching dates in two different tables and inserting value in separate column in second table when dates match.
That sounds very straightforward as long as you want an exact match for the date down to the second (I'm assuming your dates are...

8 years ago | 0

| accepted

Answered
How to add a row of zeros to a matrix using for and if?
If I understood correctly, the _add to that same row in PM a row of zeros_ actually means *insert* a row of zeros. Your code nev...

8 years ago | 0

Answered
Hi Guys, Please help me ..I want to send 35 Charters and after that i will convert in to 8 bit data the format is like this [1 0 1 0 1 0 1 1] and again at receiver side I am able to convert again 8 bit to 35 Charaters
Possibly, this is what is wanted: character = 'A' wanted = dec2bin(character, 8) - '0' If it's not what is wanted, th...

8 years ago | 0

Answered
how to detrend the data in excel
How about using the <https://www.mathworks.com/help/matlab/ref/detrend.html |detrend|> function? t = readtable('sample data...

8 years ago | 0

Answered
Change a value after a maximum five-consecutive column of zero
I don't think this can be done more efficiently than with a loop over the rows: for row = 1:size(A, 1) col = find(A...

8 years ago | 1

| accepted

Answered
Can anyone help me to debug this error
The ability to define <https://www.mathworks.com/help/matlab/release-notes.html?rntext=%22function+in+scripts%22&startrelease=R2...

8 years ago | 0

| accepted

Answered
Read text file and load data to an array
A lot simpler t = readtable('C:\somewhere\somefile.ext', 'ReadVariableNames', false); that's it. However, I'd then give ...

8 years ago | 4

Answered
Return true if only one element in matrix is nonzero
nnz(yourmatrix) == 1

8 years ago | 2

| accepted

Answered
Converting categorical data to prespecified numbers
keys = categorical({'SC', 'GA', 'MI', 'MN'}); values = [23, 10, 13, 15]; [found, where] = ismember(yourcategoricalarray,...

8 years ago | 0

| accepted

Answered
how to fix 'Error using * Inner matrix dimensions must agree.' help please
Usually when you get this error, it's because you meant to use memberwise multiplication, |.*| instead of matrix multiplication ...

8 years ago | 0

Answered
How to creat row mean for every three columns of a matrix?
Don't know where that 6.67 comes from. I assume it should be 10: mean(permute(reshape(A, size(A, 1), 3, []), [1 3 2]), 3) ...

8 years ago | 0

Answered
HELP: Find All Rows of a table which meet a specific condition
|find| is overused by newcomers to matlab. |find| is very rarely needed and it is certainly not needed in your case. That's unr...

8 years ago | 3

| accepted

Answered
How do I store values from a for loop into a table?
tables and matrices are two very different things. yourdesiredmatrix = zeros(89, 41); for i = 1:41 %calculate some...

8 years ago | 0

| accepted

Answered
I am still in stages of learning Matlab. I need to run a loop, suppose from -100 to +100, in steps of 10 for increment. Please suggest a easy and crisp way.
This is all covered in the <https://www.mathworks.com/help/matlab/getting-started-with-matlab.html Getting started with MATLAB t...

8 years ago | 0

Answered
How to operate on each column seperately
sqrt(mean(yourmatrix.^2)) is all that is needed. |mean| operates on columns by default.

8 years ago | 1

| accepted

Answered
How do I create a lower triangle matrix from a single column matrix.
tril(toeplitz(A)) is an option

8 years ago | 0

| accepted

Answered
Store Variable name as Sequence 't1', 't2', 't3',.......
years = compose('t%d', 1:20);

8 years ago | 0

Answered
subtract rows under a condition
_Since the size of data is too large_ Then you'll have to use a loop, explicitly or with |arrayfun|: newdataA = arrayfun...

8 years ago | 0

Answered
Read real numbers with textread
Here's how I'd do it: wholecontent = fileread('takt_times.txt'); lines = strsplit(wholecontent, '\n')'; linestokeep =...

8 years ago | 0

| accepted

Answered
Set different row name in table with certain range of rows
As we've established you can't use the row name property for labelling your rows but you can just use a new column. To label the...

8 years ago | 1

Answered
Error using xlsread for csvfile macbook
_and checked the add ins and I do not have any_ On a mac, |xlsread| does not use excel to read the file. As explained in the ...

8 years ago | 0

Answered
How to resign each non-zero column elements of a matrix according to a vector
Well, yes if you want to store column vectors of different length, you don't have a choice but to use cell arrays. The question ...

8 years ago | 0

Answered
Calculate the mean of two dimensions in a 3D array
|mean| on a 2D matrix (your |imageROI(:, :, i)|) will return a vector. You can't assign a vector to a scalar (which is what |Mea...

8 years ago | 1

| accepted

Answered
How to add a point only if it is far away enough from thosethat already been added ?
Your image wasn't uploaded properly. A guess that it is what you want: n=100; a=2; b=0.5; phi = (sqrt(5)+1)/2; k=1; ...

8 years ago | 0

| accepted

Answered
I have the length of a object say 147 in pixels, how can we convert the pixel value to millimeter(I don't know the manual measurement of the object)?
matlab can't do magic. You either need an image (taken under the same conditions) of something with a known dimension (could be ...

8 years ago | 0

Answered
Extracting every n number of column from matrix matlab
X = A; X(:, 4:4:end) = [];

8 years ago | 0

Answered
Unique combinations of matrices
T = {[0 0], [1 0; 0 1], [1], [1 1 0; 1 0 1; 0 1 1]} rowset = cellfun(@(t) 1:size(t, 1), T, 'UniformOutput', false); %row...

8 years ago | 0

| accepted

Answered
Calling a nested function from a dynamic regular expression throws an error
Hum, interesting problem! The documentation of dynamic regular expressions is unfortunately lacking on the workspace used. As fa...

8 years ago | 0

| accepted

Answered
How can I convert lvm data(data from labview) into matlab format.Please help I will be using this data for my research.
Most likely, data = readtable(yourlvmfile, 'HeaderLines', 9); should read the file properly. If not, instead of scree...

8 years ago | 0

| accepted

Answered
Plot with two different x-axix
Other than the issue with the undefined axis that Jonas answered, it seems that you don't know the correct syntax for |plot|. If...

8 years ago | 1

Load more