Réponse apportée
How to simply the code
"I'm working with cell arrays": Riccardo, you don't want to be doing that, especially not with 100000 rows. Or using a loop for ...

plus de 4 ans il y a | 0

Réponse apportée
How to stackplot a table?
That seems overly complicated. stack to the rescue? >> t = table(datetime(2021,7,26,0:2:22,0,0)',datetime(2021,7,26,1:2:23,0,...

plus de 4 ans il y a | 0

Réponse apportée
How to manage NaN values and calculate mean under conditions
Another possibility that uses and preserves a timetable: >> tt = readtimetable("Daily data.xlsx"); >> head(tt) ans = 8×1 t...

plus de 4 ans il y a | 0

Réponse apportée
Insert two plots and a precreated table in the same figure
Camilo, in general you don't need all those table2array calls. Just do this: plot(Tablecalc.NameOfYour6thVar,Tablecalc.NameOfYo...

plus de 4 ans il y a | 1

Réponse apportée
Subscripting into a table using three or more subscripts (as in t(i,j,k)) is not supported. Always specify a row subscript and a variable subscript, as in t(rows,vars).
Lihi, hard to say for sure, but you may want to make a table that contains those four tables. For example: >> baseline = table(...

plus de 4 ans il y a | 0

Réponse apportée
find elapse time with date rollover
Get away from using datenum. Can't say this strongly enough. >> tstr=["11:58:00"; "11:59:00"; "00:00:02"; "00:02:04"]; >> tod ...

plus de 4 ans il y a | 1

Réponse apportée
How can I create a mat file which changes the values of a column in excel table into the mat file's column headers?
I thnk you'd want to use readtimetable or readtable to bring the first xlsx into matlab. But I'm confused: the second xlsx only ...

plus de 4 ans il y a | 0

Réponse apportée
Problem using ranova for analysis of variance
Scott, haven't you explicitly not included DietaryGroup with that minus sign? I think you are using it for predictors in a way t...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
EDF reading: edfread gives timetable; possible to get struct?
Andrew, FEX issues aside, it's possible that the DataRecordOutputType parameter to edfread may help. But it's also possible that...

plus de 4 ans il y a | 1

Réponse apportée
how to use setvartype on a table that is already existing
setvartype is an import feature. let's come back to that. cell creates a cell array containing nothing but 0x0 doubles: >> c =...

plus de 4 ans il y a | 0

Réponse apportée
cant put char array in a table of char!
Don't use raw char arrays other than a char row vector. You will eventually be unhappy. Unless you are using a very old version ...

plus de 4 ans il y a | 0

Réponse apportée
How to filter first fixation times for participants
Like SS, I tried to make sense of this code. And I found the same thing: in a recent version of MATLAB, these few lines would ha...

plus de 4 ans il y a | 0

Réponse apportée
Conversion and Merger of date and time using datetime
You are correct to use datatime to parse those times of day with : as the decimal separator; duration can't currently do that. A...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Normality test of the Matlab function 'randn'
With all due respect (and I mean that), nonsense. MadhiH, I don't know what you mean when you say that, "the p-value is too hig...

plus de 4 ans il y a | 3

| A accepté

Réponse apportée
Convert julian date SAC to specific format date
I'm gonna suggest another solution that might be simpler to follow. First thing is that this isn't a Julian Date in the strict...

presque 5 ans il y a | 0

Réponse apportée
How to easily propagate the error of a column ?
Aaron, I think that depends on what you mean by "propagate the uncertainties". There is a simple formula for the variance of the...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Time series data events
Ben, I'm not sure where you are starting from. I'm gonna show how to do this with timetables. Imagine you have a timetable conta...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
get GPS time to calulate time since referencje epoch
Marta, that depends on what you mean by "GPS time". MATLAB doesn't yet have direct support for GPS time, but if all you want is...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Find the certain amount of values between NaNs and make another variable from these values
There's no need to loop over the 750K elements. Do this on each row x of your data, i.e. loop from 1:50. Try stepping through t...

environ 5 ans il y a | 0

Réponse apportée
Finding row number of a variable existing in a table
I have no idea what you mean by "In this case the second column and third row of the table.", but this sounds like what you want...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Correlating values from a table using a for loop
Not sure why you think a "loop is better". Try this: >> t = table([1;1;1;1;2;2;2;2;2;2],rand(10,1),rand(10,1),'VariableNames',[...

environ 5 ans il y a | 0

Réponse apportée
Comparing matrices and filling in the gaps
There are just so many things you can do with joins: >> a = table(["A";"B";"C";"D";"E";"F"]); >> b = table(["B";"D";"F"], [5;1...

environ 5 ans il y a | 0

Réponse apportée
Time weighted average after every 60mins
Or put the data in a timetable and use retime(tt,'hourly','mean'). If you need weights, you can write your own aggregation funct...

environ 5 ans il y a | 0

Réponse apportée
How can I construct a struct handle from a string?
A scalar struct with a field for each variable that you would have put in the workspace is often useful. It's like a private wor...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Keeping columns names but replacing value for iteration
You are horzcat'ing tables, and table variable names must be unique. But your two tables both have variables named dist1, dist2,...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Preallocation of a vector of structure
Audric, it seems like dpb understand what you are doing better than I do, but "in which each cell will be a structure of 42 fiel...

environ 5 ans il y a | 0

Réponse apportée
convert hourly data to daily sum
Turn your table into a timetable, and use retime: >> hourmelt = table2timetable(hourmelt); >> head(hourmelt) ans = 8×1 tim...

environ 5 ans il y a | 0

Réponse apportée
missing/incorrect use of math operators?
Jocelyn, modulo Geoff's concerns, I think your whole loop can be done as x = 200*3*(0:5)'; Vx = (sqrt(Vx_o) - ((k3/2).*x))^2; ...

environ 5 ans il y a | 0

Réponse apportée
Matching the size of two matrices based on values of a column
"contains time in a day in decimal form": That would be your problem. Use timetables with datetimes (or maybe durations?), and u...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
How can I fit a mesh plot axis to a vector of time values?
Does this not do what you need? >> d = datetime(2020,11,1:20); >> t = 1:15; >> mesh(d,t,x) Those dates and temps are evenly-...

environ 5 ans il y a | 0

Charger plus