MapleUser2017

75 Reputation

4 Badges

2 years, 314 days

MaplePrimes Activity


These are questions asked by MapleUser2017

Lets say I would like to construct a procedure which 

a) Allowed to call the view option from plots:-display by a different name? Lets say zoom. 

So the argument would PlotGraph(x^2,zoom = [-5..5,-5..5]) 

Is that by any means theoretically possible ? 

PlotGraph := proc(func::anything, zoom := {(x::range := a .. b), (y::range := c .. d)}) plots:-display(plot(func), view = zoom); end proc;

PlotGraph(x^2 , zoom = [0 .. 1, -5 .. 5]);


Error, (in plots:-display) expecting option view to be of type {"default", list({"default", range(realcons)}), range(realcons)} but received zoom = [0 .. 1, -5 .. 5]

 

So question to forum what am I doing wrong? 
 

 

I have been able implement this procedure here. 

AreaBetween := overload([proc(fnc::{list}, a::anything, b::anything, col::list) option overload; plottools:-transform(unapply([x, y + fnc[2]], x, y))(plot([fnc[1]] + [-fnc[2]], x = a .. b, col = [col[2], col[3]], gridlines, size = [600, 600], thickness = 3, filled = [color = col[1]])); end proc])

1) How do get to construct a larger canvas? Meaning if I want a xy axis, x = -10..10, y = -10..10 however only x = a..b is suppose to be shaded. Can I do that with my procedure? 

2) Only the lower graph is colored currently. How do I get it to color the upper graph? 

Many thanks in advance. 

I if a run the CompleteSquare command 

 

CompleteSquare(x^2 + y^2 - 2*x - y - 2 = 10, x, y)

the output is (y - 1/2)^2 + (x - 1)^2 - 13/4 = 10

Why does it places the y's before the x's? 

TangentLine(l, point(A, 0, 1), circle(c, [point(C, 0, 1), 1]))

Under geometry package if I use the command Tangentline, and if I want to change either the point of the circle, then 

Error, (in geometry:-line) the first argument is expected of type name

How I make it overwrite l each time? So I don't have to rename the tangents each time? 

 

 

Dear friends, 

Lets say I have this procedure here. 
graph := proc(fn::anything, t::{integer, name}) if type(t, integer) then return fn; else return plot(fn, gridlines); end if; end proc

Currently it returns a function from input if I provide an addtional argument in integer form. And it provides the graph for the function if I include an extra argument of type name. 

However I would like to do (if possible) is to using the same proc to make the parameter t optional instead. Meaning if type 

graph(x^2)  then it only returns the input and if I type graph(x^2,g) then instead it returns the graph of the input function. 

Is this possible to do? I have this paragraph in the help files https://www.maplesoft.com/support/help/Maple/view.aspx?path=parameter_classes#optional But I am not sure if thats the way to go? 

Hope somebody has a hint/idea? Best regards 

1 2 3 4 5 Page 1 of 5