Adept Scientific - English
The world's best software and hardware for research, science and engineering.
flag arrow
clearclear

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKdedksvnofi
Home
Products
Training
Events
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Blog |  Contact Us |  Press Room |  Jobs Adept Scientific on Facebook Adept Scientific on Twitter


The Next Steps

• Ask us a question
• Maple Product Tour
• Buy Maple Now
• View Maple Pricing
• Download a Brochure
• Request a Brochure
• Request an Evaluation
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 14 Professional
Maple 14 Academic
Maple 14 Student Use
What's New in Maple 14
Maple Features
How does Maple Compare?
Maple History
Recorded Online Seminars

MapleSim
MapleNet
Maple T.A.
BlockImporter™
Maple Toolboxes and
Connectors


Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

Maple Home
Maple 14 Professional
Maple 14 Academic
Maple 14 Student Use
What's New in Maple 14
Maple Features
How does Maple Compare?
Maple History
Recorded Online Seminars

MapleSim
MapleNet
Maple T.A.
BlockImporter™
Maple Toolboxes and
Connectors


Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

Latest Information

New Features: Professional
New Features: Academic
Maple Features
The Maple Reporter Online

Service & Support

Maple Primes
blogs, forums etc

Elite Maintenance Program
Application Centre
Powertools
Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] Plotting error: non-numeric vertex

Search email archive for  

[MUG] Plotting error: non-numeric vertex
Author: Tim Howard    Posted: 29/02/2000 22:26:27 GMT
>> From: "Tim Howard" "thoward"

I'm puzzled by an error message several of my students encountered while
working on a recent assignment. The sample code below works fine on my
office computer (Windows 95, Maple V version 5.00), but produces the
indicated plotting error when students run it in the computer lab (also
using Windows 95, version 5.00).

Any insight will be most appreciated.

Thanks,
Tim


>########################################################
> restart;
> dose1 := t -> sum((Heaviside(t-n*6)-Heaviside(t-(n*6+1/2)))*2,n=0..4);
dose1 := t ->
4
-----
\
) (2 Heaviside(t - 6 n) - 2 Heaviside(t - 6 n - 1/2))
/
-----
n = 0
> plot( dose1(t), t=0..32, numpoints=100, title= `Graph of Drug Dosage`);
Plotting error, non-numeric vertex definition

==========================================================================
Tim Howard
"thoward"
Associate Professor

Mathematics Department http://math.colstate.edu/thoward/
Columbus State University phone: 706-568-2172
4225 University Avenue fax: 706-569-3125
Columbus, GA 31907
==========================================================================

[MUG] Re; Plotting error: non-numeric vertex
Author: Maple Group    Posted: 03/03/2000 20:27:12 GMT
>> From: Maple Group "maple_gr"

| From: "Tim Howard" "thoward"
| I'm puzzled by an error message several of my students encountered while
| working on a recent assignment. The sample code below works fine on my
| office computer (Windows 95, Maple V version 5.00), but produces the
| indicated plotting error when students run it in the computer lab (also
| using Windows 95, version 5.00).
|
| > dose1 := t -> sum((Heaviside(t-n*6)-Heaviside(t-(n*6+1/2)))*2,n=0..4);
| > plot( dose1(t), t=0..32, numpoints=100, title= `Graph of Drug Dosage`);
| Plotting error, non-numeric vertex definition

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: "Rouben Rostamian" "rostamian"
Date: Wed, 1 Mar 2000 16:55:00 -0500
To: "maple-list"
Subject: Plotting error: non-numeric vertex


The Heaviside function is undefined at zero. When a plotting point
falls exactly at a jump, it results in a non-numeric vertex definition.
Looks like your office machine and the lab machines evaluate the function
at different sets of points.

To fix the problem, use the signum function instead of Heaviside.
Specifically, set

step := x -> (1+signum(x))/2;

then let

dose1 := t -> sum((step(t-n*6)-step(t-(n*6+1/2)))*2,n=0..4);


--
Rouben Rostamian "rostamian"


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Wed, 1 Mar 2000 22:18:47 -0500 (EST)
From: Carl DeVore "devore"
To: "maple-list"
Subject: Plotting error: non-numeric vertex



That seems very similar to a problem that wracked my brain for a few hours
last semester. I was plotting sin(x)^x on 0..Pi. I or my students use
all the following versions of Maple:
release 5 and 5.1 for Unix, Windows 95, and Windows 98
student release 4 and 5 for Windows 95 & 98
MacIntosh versions that I don't know numbers for (never touch the stuff
myself).
I found so many differences in the behavior of this plot over different
versions that I can't keep track of them. I can tell you this for sure:
The command
> plot(sin(x)^x, x= 0..Pi);
gives the non-numeric vertex error on release 5 for Unix but does not give
the error on either release 4 or release 5.1 for Unix. The best overall
solution that I found was to include the "discont= true" option to the
plot command.

There are some additional suggestions in section 1.2 of _Calculus the
Maple Way_ by Robert B Israel.


That brings up a question I have for the list: If I define the continuous
extension of sin(x)/x like this:
> f:= x -> piecewise(x<>0, sin(x)/x, x=0, 1);
then "D" correctly computes the derivative at 0. But the function as
written cannot be evaluated at 0 -- f(0) gives a division-by-zero error.

On the other hand, if I define f this way:
> f:= x -> sin(x)/x; f(0):= 1;
then f can be evaluated at 0 but its derivative cannot be. Also, the
infnorm command will give incorrect results for the 4th derivative of this
f.

The only way I can find to get everything to work is to use both the
piecewise and define f separately at 0:
> f:= x -> piecewise(x<>0, sin(x)/x, x=0, 1); f(0):= 1;
But this feels unsatisfactory to me, and is difficult to explain to the
students. The piecewise alone should work.

Carl Devore
University of Delaware



-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 02 Mar 2000 10:06:45 +0100
To: "maple-list"
From: Wilhelm Werner "werner"
Subject: Plotting error: non-numeric vertex


Hallo.
I encountered that error often with rel. 4 of Maple but no longer in rel. 5.1.
It was due to "undefined" cases in Heaviside; look:
> convert(Heaviside(t-4),piecewise);
{ 0 t < 4
{
{ undefined t = 4
{
{ 1 4 < t
For plotting of those Heaviside terms I therefore converted the functions
to a piecewise form and removed the undefined points from the piecewise list.
Regards
W.Werner
----------------------------------------------------------------------
Wilhelm Werner Phone: +49-(0)7940-1306-96
FH Heilbronn/Standort Kuenzelsau Fax : +49-(0)7940-1306-20
Daimlerstr. 35
D-74653 Kuenzelsau

e-mail: "werner"
----------------------------------------------------------------------



-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 02 Mar 2000 08:09:49 -0600
From: Jan Zijlstra "zijlstra"
To: "maple-list"
Subject: Plotting error: non-numeric vertex

Dear Dr Howard,

The problem may be a leftover from a syntax change in the sum command:
try putting the index variable in back-quotes:

dose1 := t ->sum((Heaviside(t-n*6)-Heaviside(t-(n*6+1/2)))*2,`n`=0..4);

Maybe some machines in the lab have not been upgraded from vs 4?

Hope this helps,

Respectfully,

Jan Zijlstra



--
+-------------------------------------------------------------+
| Jan Zijlstra, Ph.D. |
| Department of Mathematical Sciences |
| Middle Tennessee State University |
| P.O. Box 34 |
| Murfreesboro TN 37132 |
| USA |
+---------------------------+---------------------------------+
| Tel: (615)898-2691 | WWW: http://mtsu.edu/~zijlstra |
| Fax: (615)898-5422 | e-mail: "zijlstra" |
+-------------------------------------------------------------+


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 02 Mar 2000 08:22:54 -0600
From: Herman Jaramillo "herman.jaramillo"
To: "maple-list"
Subject: Plotting error: non-numeric vertex


Dear Tim.

I have some tips and questions with them, since I am not expert on Maple.
If you do not use the parenthesis around your function in the plot definition,
this instruction will give you a plot.
plot(dose1, t=0..32, numpoints=100, title="Graph of Drug Dosage");
however you can check that the plot is identically zero (it shouldn't,
right?)
--actually the numbers are very small, like .2441260182907164 10^(-230)---
I do not understand why, but I am sure a Maple guru can help us here.

I made it work the following way.
> dose2 := sum((Heaviside(t-n*6)-Heaviside(t-(n*6+1/2)))*2,n=0..4);

> plot(dose2(t), t=0..32, style=point, numpoints=100, title="Graph of Drug
Dosage");


The question is when to use the argument (t), and when no. While the
differences
between function definition and unapply and all that have been explained I
still have a
hard time with the sintax. I guess I have not got the concept yet and all I
can do
now is trial an error.

--
Herman Jaramillo phone: 713-689-6503
Research Geophysicist fax : 713-689-6100
Baker Hughes (Western Geophysical) email: "herman.jaramillo"
3600 Briarpark Drive (77042-5275)
P.O. Box 2469
Houston, Texas 77252-2469




Previous by date: [MUG] Re: Parameter in initial condition?,  Douglas B Meade
Next by date: [MUG] dsolve[numeric] output order,  Andris Lasis/Sim S S Service Centre
Previous thread: [MUG] How protect a MapleWorkSheet,  Juan Manuel De Olazabal
Next thread: [MUG] dsolve[numeric] output order,  Andris Lasis/Sim S S Service Centre



Ready to buy?

Maple Professional
Add to shopping basket
£ 1,695.00
Upgrade to Maple 13 from v11 or v10
Add to shopping basket
£ 1,065.00
Maple Professional - for concurrent use
Add to shopping basket
£ 3,385.00
MapleSim (requires Maple)
Add to shopping basket
£ 4,075.00
Maple & MapleSim Bundle
Add to shopping basket
£ 5,770.00

Featured Downloads

Maple Whitepaper: Making Sense out of Engineering Modeling and Mathematics
Maple Whitepaper: Driving Innovation - How mathematical modeling and optimisation increase efficiency and productivity in vehicle design.
MapleSim Whitepaper: Technological Superiority in Multi-Domain Physical Modelling and Simulation

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks
adept

Top of the Page

Popular Links: ChemDraw | ChemOffice | Data Acquisition | Data Analysis | EndNote | Maple | MapleSim | Mathcad | MathType | Quality Analyst | Reference Manager | VisSim

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2010, Adept Scientific plc.
Site designed and maintained by Adeptise

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055