Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7173
| From | John Colvin <john.loughran.colvin@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Plots come out blank except for certain limits |
| Date | 2011-12-13 10:48 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jc7ah2$oto$1@smc.vnet.net> (permalink) |
Hi, I'm an absolute beginner with Mathematica so I may well have
missed something very simple.
I'm trying to visualise a simple minimisation problem in 2 parameters
This is the code i run:
f[a, b] = Integrate[(Sin[5*x] + Sin[3*x] - Sin[a*x] - Sin[b*x])^2, {x,
0, 10}]
this takes quite a while and returns a VERY long result
then I attempt to plot:
Plot3D[f[a, b], {a, 0, 10}, {b, 0, 10}]
the resulting plot is a 3D sinusoidal of sorts, from f = -1..1. Unless
I'm very much mistaken, the integral of the square of a real-valued
function should always be positive, so something seems amiss here
already.
Also, if I change the a and b ranges:
Plot3D[f[a, b], {a, 0, 12}, {b, 0, 12}]
for example, I get a blank plot
I realise I may just be missing something simple, but any help would
be much appreciated.
Thanks,
John
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Plots come out blank except for certain limits John Colvin <john.loughran.colvin@gmail.com> - 2011-12-13 10:48 +0000
csiph-web