plotting graph

1 次查看(过去 30 天)
bikal shrestha
bikal shrestha 2012-5-14
how to plot the graph by reading the file from "name.txt" in a realtime mode with a interval of 0.004. I was able to plot the data from txt file but can't do in realtime mode... this is the code-- %from here clc %x=0:0.008:2.048 x(1)=0; fid = fopen('name.txt', 'r'); for i=1:257 d=textscan(fid,'%n',1); x=x+0.008 y(i)=x; a(i)=d{:}; end for i=1:257 pause on pause (0.004) m=y(i); n=a(i); plot (m,n) ylabel('voltage(mv)') xlabel('time(ms)') title('ECG of normal ECG') grid end fclose(fid)
%program ended any help will be greatly appreciated... thanx in advance..

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by