exponenta event banner

cumsum

Совокупная сумма

cumsum не рекомендуется. Использование timetable вместо этого. Для получения дополнительной информации смотрите, Преобразуют Финансовые маневры Объектов Временных рядов в Расписания.

Синтаксис

newfts = cumsum(oldfts)

Описание

newfts = cumsum(oldfts) вычисляет совокупную сумму каждого отдельного ряда данных временных рядов в финансовом объекте oldfts временных рядов и возвращает результат в другой финансовый объект newfts временных рядов. newfts содержит те же серийные имена данных как oldfts.

Примеры

свернуть все

В этом примере показано, как вычислить совокупную сумму для акций Диснея и построить результаты.

load disney.mat 
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
cs_dis = cumsum(fillts(dis));
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
plot(cs_dis)
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
title('Cumulative Sum for Disney')

Figure contains 2 axes objects. Axes object 1 with title Cumulative Sum for Disney contains 4 objects of type line. These objects represent OPEN, HIGH, LOW, CLOSE. Axes object 2 contains an object of type line. This object represents VOLUME.

Представлено до R2006a