Effacer les filtres
Effacer les filtres

Incorrect number or types of inputs or outputs for function 'dateshift'.

3 vues (au cours des 30 derniers jours)
piero
piero le 15 Août 2023
Commenté : piero le 15 Août 2023
HI, I WANT TO DO THIS:
2021 ****
2022 ****
but it give me error
dateshift(c,'start','year')
>> class(c)
ans =
'timetable'

Réponses (1)

Walter Roberson
Walter Roberson le 15 Août 2023
Modifié(e) : Walter Roberson le 15 Août 2023
Do you actually need to change the time entries, or do you just need to have them display as years?
Changing the time entries could give challenges if it ended up with duplicate row times.
If you just want to change the display then,
c.Properties.RowTimes.Format = 'uuuu';
If you need to change the actual times then
c.Properties.RowTimes = dateshift(c.Properties.RowTimes, 'start', 'year');
Note that shifting to the start of the year is not enough to change the display to be just year.
  3 commentaires
piero
piero le 15 Août 2023
Modifié(e) : piero le 15 Août 2023
thanks correct...in the table of year i solve with problem with : c.Properties.RowTimes.Format = 'uuuu';
instead in the array of months I want to change it like this
from
01-Jan-2022 -3908.5
01-Feb-2022 10274.5
01-Mar-2022 10496.75
01-Apr-2022 12027.25
01-May-2022 6304.5
to
31-01-2022 xxx
20-02-2022 xxx
i try code:
c1 = dateshift(c1.Properties.RowTimes, 'start', 'month');
but i don't see any difference
piero
piero le 15 Août 2023
i solve it
c1 = dateshift(b.Properties.RowTimes ,'end', 'month');
A=table;
A.Date=c1;
A.Prof=b.Profit;
thank you

Connectez-vous pour commenter.

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by