[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Plotting basics
From: |
Damian Harty |
Subject: |
RE: Plotting basics |
Date: |
Fri, 21 Feb 2014 09:07:29 +0000 |
> Is it a problem to plot zeros? I'm not specifying any axis bounds, so maybe
> the auto-bounds generator is specifying zero,
> and that conflicts with the semilogy() function? I need to show zeros, but
> there needs to be logarithmic scaling too.
Yes, the log of zero is undefined. You might like to add a "small" number to
your array that disappears off the left hand end of your graph.
> I get errors about "subscript indices must either be positive integers less
> than 2^31..." What does it mean? Why can't I have a linear plot?
You are trying to plot an array element that is beyond the bounds of what is
possible. Since I find it unlikely you have an array with 2147483648 elements,
I wonder if it is possible that you aren't doing what you *think* you are
doing. This is a remarkably common state of affairs.
> When I use the axis() function, all my inputs are ignored. It just plots the
> same auto-bounds that it was plotting before.
> I call it like "axis([1,30,-100,1000]);" before anything else happens in the
> script.
This code works for me:
time=0:0.1:10;
sine=sin(time*2*pi/5);
figure
plot(time,sine)
axis([-1,11,-1.5,1.5])
Try putting your axis command at the end.
Damian
CONFIDENTIAL: The information contained in this email communication is
confidential information intended only for the use of the addressee.
Unauthorized use, disclosure or copying of this communication is strictly
prohibited and may be unlawful. If you have received this communication in
error, please notify us immediately by return email and destroy all copies of
this communication, including all attachments.
- Plotting basics, Byron Hawkins, 2014/02/21
- Re: Plotting basics, Ben Abbott, 2014/02/21
- Message not available
- Re: Plotting basics, Ben Abbott, 2014/02/21
- RE: Plotting basics, Damian Harty, 2014/02/21
- Message not available
- Re: Plotting basics, Ben Abbott, 2014/02/21
- RE: Plotting basics, Byron Hawkins, 2014/02/21
- Re: Plotting basics, Mike Miller, 2014/02/21
- RE: Plotting basics, Byron Hawkins, 2014/02/21
- Re: Plotting basics, Ben Abbott, 2014/02/21
RE: Plotting basics,
Damian Harty <=