Convert all my txt file to graph and save it as image file

4 views (last 30 days)
Hi all, I am unable to convert all my txt files from graphs to image. I am able to plot the graph but i am unsure how to save it as img for matlab. Please help! Thanks in advance.
These are the codes for me to convert my dataset to graph
filename = 't-1.txt';
deliminator = ' ';
scope_data = dlmread(filename, deliminator, 1, 0);
resistance = scope_data(:,1);
reactance = scope_data(:,2);
hold on
grid on
grid minor
plot (resistance, reactance, 'blue')
title ('Eddy Current Testing')
xlabel ('Resistance')
ylabel ('Reactance')

Answers (1)

Robert U
Robert U on 27 Nov 2019
Hi kenneth lee,
have a look at these two built-in functions:
Kind regards,

Community Treasure Hunt

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

Start Hunting!