- #1
MatRobert
- 4
- 0
Hello,
I am new to Matlab and got a question to ask.
I have created a .m file which plots a cosine graph.
For simplicity, say
time=0:T/999:T;
x=cos(2*pi*time);
plot(time,x);
Then this will create a plot with cos(2piT) with domain of 0~T.
I will like to export this to other .m file so the file can read this graph and calculate the frequency of graph.
But I'm stuck as how I can export this graphical data to other .m file.
Because if I just lookup data on x, it will just give out an array of 1000 values and not knowing its domain(time), I can not calculate the frequency.
Hope this makes sense.
Will appreciate your helps!
I am new to Matlab and got a question to ask.
I have created a .m file which plots a cosine graph.
For simplicity, say
time=0:T/999:T;
x=cos(2*pi*time);
plot(time,x);
Then this will create a plot with cos(2piT) with domain of 0~T.
I will like to export this to other .m file so the file can read this graph and calculate the frequency of graph.
But I'm stuck as how I can export this graphical data to other .m file.
Because if I just lookup data on x, it will just give out an array of 1000 values and not knowing its domain(time), I can not calculate the frequency.
Hope this makes sense.
Will appreciate your helps!