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)...

3 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...

3 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...

3 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...

4 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...

4 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...

5 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...

5 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. ...

5 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...

2 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)'; ...

2 years ago | 1 answer | 0

Question

Running a script in a repeated time interval

I have a matlab file which i saved as sos.m. I run this script by clicking the run button in the matlab program. My question is ...

2 years ago | 2 answers | 0

Question

finding the 10 biggest values in a cell array

I have a cell array 10x10 that consists of of several matrices (1000x1) with integers. I want to find the 10 biggest integers in...

3 years ago | 2 answers | 0

Question

filtering out two months with a code

dateless = Dates(nomatch); datelike = Dates(~nomatch); dateliketime=datetime(datelike); liatime=dateliketime.Month ==...

3 years ago | 2 answers | 0

Question

filtering problem of dates

circa1 = xlsread(fileToRead); [numOnly, textOnly, rawDataInCellArray] = xlsread(fileToRead); Dates=textOnly(~cellfu...

3 years ago | 1 answer | 0

Question

zoom in function figure

hi, my code shows me 10 different figures and for each figure I have to zoom in. This is very time consuming. Can I display the...

3 years ago | 1 answer | 0

Question

displaying date as title of figure

hi, i want to display a date as title of a figure. caption = sprintf(' %.3f', datestr(q{:,1}(1,1))); This q cell array c...

3 years ago | 2 answers | 0

Question

import time into matrix and display as minutes after midnight

hi guys, I have imported an excel file into matlab. 10:00 is displayed as 0.416666666666667. I want to display this as minutes ...

3 years ago | 1 answer | 0

Question

Plot vertical lines in a figure with a certain distance

Hi, I would like to plot vertical dotted lines on a figure. These should be placed after every 60 units on the x axis.

3 years ago | 1 answer | 0

Question

changing minutes after midnight into a datetime array

Suppose you have the matrix minutesaftermid which contains integers that represent the minutes after midnight, e.g. 1,2,3,4,5,6,...

3 years ago | 3 answers | 0