主题:求助!如何用matlab处理macd
clear
close all
dirname='C:\Documents and Settings\apollo\My Documents\MATLAB\abx.txt'
datafile=fopen(dirname);
dirname =
C:\Documents and Settings\apollo\My Documents\MATLAB\abx.txt
>> M1 = csvread('abx.txt',1,1);
M2 = csvread('abx.txt',1,2); M3(:,1)=M1(:,1)
M3 =
20071001
20071002
20071003
20071004
20071005
20071008
20071009
20071010
20071011
20071012
20071015
20071016
20071017
20071018
20071019
20071022
20071023
20071024
20071025
20071026
20071029
20071030
20071031
20071101
20071102
20071105
20071106
20071107
20071108
20071109
20071112
20071113
20071114
20071115
20071116
20071119
20071120
20071121
20071123
20071126
20071127
20071128
20071129
20071130
20071203
20071204
20071205
20071206
20071207
20071210
20071211
20071212
20071213
20071214
20071217
20071218
20071219
20071220
20071221
20071224
20071226
20071227
20071228
20071231
到这里都没问题
macd.abx=macd(m3.abx) plot(macd.abx)
我觉得m3是时间序列 abx是数据这样编 但出现错误
??? Error: "macd" previously appeared to be used as a function or command, conflicting with its use here as the name of a variable.
A possible cause of this error is that you forgot to initialize the
variable, or you have initialized it implicitly using load or eval.
不知如何处理 请大家帮忙 谢谢
close all
dirname='C:\Documents and Settings\apollo\My Documents\MATLAB\abx.txt'
datafile=fopen(dirname);
dirname =
C:\Documents and Settings\apollo\My Documents\MATLAB\abx.txt
>> M1 = csvread('abx.txt',1,1);
M2 = csvread('abx.txt',1,2); M3(:,1)=M1(:,1)
M3 =
20071001
20071002
20071003
20071004
20071005
20071008
20071009
20071010
20071011
20071012
20071015
20071016
20071017
20071018
20071019
20071022
20071023
20071024
20071025
20071026
20071029
20071030
20071031
20071101
20071102
20071105
20071106
20071107
20071108
20071109
20071112
20071113
20071114
20071115
20071116
20071119
20071120
20071121
20071123
20071126
20071127
20071128
20071129
20071130
20071203
20071204
20071205
20071206
20071207
20071210
20071211
20071212
20071213
20071214
20071217
20071218
20071219
20071220
20071221
20071224
20071226
20071227
20071228
20071231
到这里都没问题
macd.abx=macd(m3.abx) plot(macd.abx)
我觉得m3是时间序列 abx是数据这样编 但出现错误
??? Error: "macd" previously appeared to be used as a function or command, conflicting with its use here as the name of a variable.
A possible cause of this error is that you forgot to initialize the
variable, or you have initialized it implicitly using load or eval.
不知如何处理 请大家帮忙 谢谢