Question

Rearranging dates to make them suitable for datetime format

Hi, I have a cell array with many dates that were imported from an excel file. Each cell array entry has differnt inputs ie...

25 days ago | 2 answers | 0

Question

Adding cell array entries

Suppose you have a 162*24 cell array called CC and each cell array entry consist of a matrix. How would you add CC{1,1}+CC{2...

27 days ago | 2 answers | 0

Question

Adding cell array values across column

Columns 1 [ 7.669142585357160e-04] [-1.206232786783515e-04] [ 8.630787019556518e-04] [-2.4458835258415...

27 days ago | 1 answer | 0

Question

Removing time from datetime

Hi, I have a datetime array in the following format i.e. 31-Dec-2019 08:00:00. I just want to remove the time component from ...

27 days ago | 2 answers | 0

Question

Add time to datetime format

Hi, I have a datetime format in the following format (MM-dd-yyyy), but it does not have time. How can I add time to it for inst...

27 days ago | 2 answers | 0

Question

Change imported date into datetime format

Hi, I have a cell array with many dates that were imported from an excel file. Each cell array entry looks like this ie. 08/2...

27 days ago | 1 answer | 1

Question

Removing repeated numbers in a matrix

Ex: In a matrix A = [9 9 1 1 2 2 2 2 2 0 3 3; 7 7 4 4 4 5 5 6 6 6 6 6 ; 8 8 7 7 7 8 8 8 9 9 9 5] , i want to eliminate all r...

27 days ago | 2 answers | 0

Question

Filling matrix with zeros whilst retaining original value

Hi I got a 1x14 matrix filled with random numbers. I want the remaining entires to be filled with zero so that I get a 1x180 ma...

27 days ago | 1 answer | 1

Question

Remove repeating variables and replacing them

Ex: In the array x=[4 4 5 5 1 2 2 3 3 3 4 5] , i want to eliminate all repeating elements and retain non-repeating elements ...

28 days ago | 1 answer | 0

Question

Problem with accumarray and constructing an array with accumulation

for k=1:24 n =24; for jj = numel(n):-1:1 cd = circshift(out2hourly{1}, [-(k-1) 0]); n1 = ceil((1:size(cd,1))'/n(jj)...

4 months ago | 1 answer | 0

Question

Matrix reshaping and combination

cd(1:24:end,4) Suppose the above where cd is a matrix variable. I want the fourth column to be extracted in such a way that I g...

4 months ago | 1 answer | 0

Question

find coordinates within a matrix

Suppose I have the following matrices: b= 0.85981 0.87169 and a= 0.855750000000000 0.858420000000000 0.858110000000000...

5 months ago | 1 answer | 0

Question

datetime with certain number of rows

I have a datetime array with 1000 rows. I want to extend it to 1200 rows. The last 200 rows should be just a repetition of th...

5 months ago | 0 answers | 0

Question

Converting cell array to matlab datetime format

Hi, I have a cell array with dates like this '03.08.2003 23:00:00.000 GMT+0200' I want the cell array to be converted to a dat...

5 months ago | 2 answers | 0

Question

Fullfile function gives me a false reading with the slash symbol

fileToRead = fullfile('C:\Users\thomas\Files\' CCC '.csv'); CCC is a string file with CCC='Tax' I get the following: C:\Use...

6 months ago | 2 answers | 0

Question

How to convert char array to a complete word

ans = 5×1 char array 'H' 'E' 'L' 'L' 'O' Hi, how can I convert the aforementioned array into a...

6 months ago | 0 answers | 0

Question

how can i convert the content of a character array to a variable name

Hi, I have a character variable called xx=Hello. I want to convert that xx variable to a matrix name variable named Hello. ...

6 months ago | 1 answer | 0

Question

Delete a row in a structure that contains a certain word

Hi, I have a 1×5897 struct array with fields. How do I delete the entire rows that contain the letters 'AA'.

1 year ago | 1 answer | 0

Question

Filter a cell array with words

Hi, assume you have the cell array{1,1} with a text called "XXXX-adsaads". I want the the portion -adsaads to be removed so tha...

1 year ago | 1 answer | 0

Question

Removing adjacent duplicate numbers in rows of a matrix

Hi, assume the following matrix format: xx=[1 2 3 3 4 4; 1 1 2 2 3 3 ; 5 5 5 3 3 2] I want to remove the adjacent duplicate n...

1 year ago | 2 answers | 0

Question

saving all figures as jpeg file on harddrive

Hi, i got a loop and it creates many figures (figure 1, figure 2 and so on). I want to save all as jpeg file on my harddrive. A...

2 years ago | 1 answer | 0

Question

creating several bar charts with standard deviation

Hi, suppose you got x=mean1, mean2, mean3, mean4 stdx=eror1,error2,error3, error4 y=mean1, mean2, mean3, mean4 stdy=error1...

2 years ago | 1 answer | 0

Question

Converting a timetable to a matrix

Consider the following table TimeStamp X1 X2 X3 X4 ____________________ ___...

2 years ago | 2 answers | 0

Question

convert matrix into matrix with a repetitive pattern

Consider the following matrix. 234 235 236 237 238 239 I want to convert it into the ...

2 years ago | 1 answer | 0

Question

Create a matrix with a repetitive pattern

Hi, consider the following matrix. 234 235 236 237 238 239 I wa...

2 years ago | 1 answer | 0

Question

Creating a table with missing endpoints

Hi, consider the matrix below: 732315 108 1.9193000 1.9193000 1.9193000 1.9193000 732315 113 1.9193000 1.9193000 1...

2 years ago | 1 answer | 0

Question

How to fill a data table with gaps

Hi, I have got this data table with the following values: As you can see from the table below that there are gaps in the seco...

2 years ago | 1 answer | 0

Question

if option with weekend and date serial number

I have a date serial number x. If the number is a weekend then x+3, if the number is not a weekend then x +1. how can i put this...

3 years ago | 1 answer | 0

Question

denoting vertical lines with numbers

VLX = repmat(xy(60:60:end), 2, 1); % Vertical Line ‘x’ Locations VLY = repmat(ylim, 24, 1)'; ...

3 years ago | 1 answer | 0