Christopher2222

MaplePrimes Activity


These are answers submitted by Christopher2222

I'm going to guess your next follow up to this is to find the midpoint of multiple points.  So for some added inspiration you might want to check here http://www.mapleprimes.com/posts/94681-Centroid-Of-A-List-Of-Points

 

add

axis=[mode=log] to your plot line to change the scale. 

SHIFT+ENTER will enter the next line and not execute the code

And a few other helpfuls

CTRL+SHIFT+K will enter a new line above

CTRL+SHIFT+J will enter a new line below

CTRL+SHIFT+" will allow you to enter directly above a letter

 

a:=plot(x^2)

op(1,op(1,a)) will produce a list of points used to create the plot

b:=pointplot([[1,2],[3,4],[5,6]]):

op(op(1,b)) will produce the set of points used

c:=spacecurve([sin(x),cos(x),0],x=0..2*Pi):

similarily op(1,op(1,c) for the spacecurve will produce a list of points used. 

As for showing your 3d point you must use plot3d with style=point or use pointplot3d, check the help file

Sometimes that happens when a dvd or cd isn't closed causing compatability drive issues.

for i from 0 to 10 do
  y:=i/2:
  f:=2*x+y:
  a[i]:=plot(f,x,color=COLOR(HUE,i/11):
end do:
plots:-display(seq(a[i],i=0..10))

 

 

This is not exactly what you want but it may be helpful.  Here's how we can plot x^2 over the surface cos(x)*x^3

with(plots):with(plottools):

a:=plot3d([cos(x)*x^3],x=-10..10,y=0..100,style=patchnogrid):
b:=plot(x^2):

to3d:=transform((x,y)->[x,y,cos(x)*x^3]):

c:=to3d(b):

display(a,c,axes=box)

 

f:=x->sin(x)

g:=->2*x

Then it should work

the description: The Fit command fits a model function to data by minimizing the least-squares error. 

Any approximation won't fit all points.  However when I execute your sheet in Maple 12, it doesn't produce the curved line that your graph shows, I produce a straight line. 

and kurve:=plot(g1(59,Q),RangeQ):  actually fits the points better

 

Is realtime memory usage needed?

To answer one of your questions.  I believe the output plot size has been a request for users for some time.  There have been a few posts asking how to change the size of a plot using code (which would be very nice).

Unless someone has been clever enough to find a way to do it, I think your stuck with standard plot output sizes.

g:=10101110

h:=convert(g,string)

n0:=parse(h[1])
                            n0:=1
n1:=parse(h[2])
                            n1:=0

This is only one option.  You can try using convert and then use Reverse from ListTools.

g:=10101110

h:=convert(g,base,10)
                                           h:=[0,1,1,1,0,1,0,1]
with(ListTools):

hh:=Reverse(h)
                                                [1,0,1,0,1,1,1,0]

n0:=hh[1]
                            n0:=1

n1:=hh[2]
                            n1:=0

...

 

 

I ask myself, is there a way around this issue.  Anything I've tried mathematically does not allow the transformed 3d plot to look like the 2d plot.  I tried matrixplot and a couple of other ideas but it doesn't get around the way Maple shades 3 dimensional objects.  However I did come up with one solution that should work (haven't tried it but it should work), it is a poor solution as it requires extra steps. 

My solution was to export the 2d image as a .bmp file and then import that image onto a 2d plane in 3 space, much like what I did with my 3 section layer pseudo image of a human skull. 

If anyone can suggest a better idea or a way to do it without exporting to a bmp, I'm open to them.  In the meantime the bmp solution will do for now. ... perhaps increasing the number of points will partially fix the situation.  I'll have to try that when I get home.

So it appears the view option doesn't work for pointplot3d (standard interface).  It appears to mess up the zoom option when a symbol type is selected. 

One workaround, albeit a poor one, is to add a couple of extra outlying dummy points.  In my example we could add the extra points [-10,-10,-10] and [10,10,10].

Is there a fix for this being worked on as well?

First 32 33 34 35 36 37 38 Last Page 34 of 48