FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » Symbolic
Testing if an expression produces graphics.
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Dave (from the UK
science forum beginner


Joined: 01 Jun 2006
Posts: 1

PostPosted: Thu Jun 01, 2006 5:20 pm    Post subject: Re: Testing if an expression produces graphics. Reply with quote

Dave (from the UK) wrote:

Quote:
Ideally I'd like something like that automatically if the output is
graphical or not, and if so puts the commands inside an Export[].

Any ideas?

I've found the answer - test the Head.
Back to top
Dave (from the UK)
science forum addict


Joined: 12 Jan 2006
Posts: 76

PostPosted: Thu Jun 01, 2006 1:57 am    Post subject: Testing if an expression produces graphics. Reply with quote

I've written a front end to mathematica, but it needs the user to decide
in advance if the output will be text or graphics. If its graphics, it
will then Export[] it as a jpeg.

So for example

1+1 is not saved as a jpeg, but

Plot[Sin[c],{x,0,12}]
is actually converted to

Export["foo.jpg", Plot[Sin[c],{x,0,12}] ]

At the minute, as I write my application has two buttons "Text" and
"Graphical"

Non-working example at:
http://www.althorne.org/test/witm.php
(PS, don't try reaching that page with a PDA, as there is some *broken*
code that detects mobile devices.)

so the user must decide - hardly elegant it must be said.

Ideally I'd like something like that automatically if the output is
graphical or not, and if so puts the commands inside an Export[].

Any ideas?



--
Dave K MCSE.

MCSE = Minefield Consultant and Solitaire Expert.

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica frontend)
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Jun 22, 2017 2:13 pm | All times are GMT
Forum index » Science and Technology » Math » Symbolic
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Integrate erf type expression Pratim Vakish num-analysis 4 Mon Jul 17, 2006 2:27 pm
No new posts How to get the analytical PDF of this expression? glare22@gmail.com num-analysis 3 Thu Jul 13, 2006 9:08 am
No new posts Simplifying Algebraic expression Jeffrey Spoon Math 4 Wed Jul 12, 2006 3:04 pm
No new posts ? LS expression for A*x = b Cheng Cosine num-analysis 4 Tue Jul 11, 2006 11:27 pm
No new posts EMITER is testing dedanoe Dobri Karagorgov Math 3 Mon Jul 10, 2006 10:54 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0352s ][ Queries: 20 (0.0101s) ][ GZIP on - Debug on ]