[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting Tic Marks
From: |
Joe Koski |
Subject: |
Setting Tic Marks |
Date: |
Thu, 28 Jul 2005 17:11:11 -0600 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
I'm trying to manually set tic marks on a plot. According to "help tics,"
the tics function has the form:
tics(axis,[pos1,pos2,...],['lab1';'lab2';...])
Rather than typing a long array of pos1,pos2,pos3,..., I would prefer to
define a vector, and then pass it to tics, but I can't seem to find the
correct format. What I have tried is:
figure(ifig);
clg;
legend('off');
axis('auto');
title([in_file," - Power Spectrum - Welch"]);
xlabel("Frequency, Hz");
ylabel("Signal Amplitude, dB");
Pxt=10*log10(abs(Px'));
axis([0,20000]);
tic_array = int2str([0:1000:20000])
tics(x,tic_array);
grid on;
plot(w,Pxt);
where tic_array is a character string with the correct values, but with
space, not comma, delimiters. Without the commas, I get an error message.
Is there a simple way to convert a vector into something usable by "tics?"
Thanks,
Joe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Setting Tic Marks,
Joe Koski <=