[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dlmread issues
From: |
dirac |
Subject: |
dlmread issues |
Date: |
Mon, 5 Jul 2010 05:19:54 -0700 (PDT) |
Hi again all,
I have a few functions now that read in matricies of data from a .txt file.
They all have a few other lines of code in the script usually to plot some
of the columns.
When I run the function, which I pass the filename through, all I want it
the plots and not the data to be displayed in the Octave window. An example
is:
function gp=gainpeakplot(flnm)
gp = dlmread(flnm);
%Plotting various columns in the matrix gp...
close all
plot(gp(1:length(gp),1),gp(1:length(gp),2),'g')
hold on
plot(gp(1:length(gp),1),gp(1:length(gp),4),'m')
xlabel ('Length of Gain Section (\mum)')
legend ('FWHM (nm)','Peak Gain (cm^{-1})')
title ('FWHM and Peak Gain of Gain Spectra vs. Length of Gain Section')
grid on
axis tight
end
even though I have the semicolon after line 2 (dlmread bit) I still get the
file displayed as the answer to the function... (ans=whatever the file it is
that I read in) which I then have to press 'q quit' to get the plot
Is this something that can be suppressed or is it something I have to put up
with?
Thanks in advance
Martin
-----
Converting myself from Excel to Octave for reasons I hope to find out.
--
View this message in context:
http://octave.1599824.n4.nabble.com/dlmread-issues-tp2278311p2278311.html
Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |