Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Another query is what am I doing wrong in this program to calculate moving average?

1 回表示 (過去 30 日間)
Anuradha Bhattacharya
Anuradha Bhattacharya 2015 年 2 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
load('proctrial_1.lvm);
output = tsmovavg('proctrial_1.lvm','s',1000,2)
plot(output);
plot(output)
x = output(:,1);
y = output(:,2);
plot(x,y);
Its returning the error, 'Error: File: Movavg1.m Line: 1 Column: 6 A MATLAB string constant is not terminated properly.

回答 (2 件)

Guillaume
Guillaume 2015 年 2 月 12 日
I don't have the financial toolbox, but just looking at the doc, it doesn't look like tsmovavg accepts a file name as its first argument. Shouldn't it just be:
output = tsmovavg(proctrial_1, 's', 1000, 2)
Note that output is a very poor variable name. It says nothing about what's in the variable.

Shekhar Vats
Shekhar Vats 2019 年 10 月 10 日
It should be
load('proctrial_1.lvm');
instead of
load('proctrial_1.lvm);

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by