Clear Filters
Clear Filters

plotting graph

1 view (last 30 days)
bikal shrestha
bikal shrestha on 14 May 2012
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..

Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!