janhardo

745 Reputation

12 Badges

11 years, 137 days

MaplePrimes Activity


These are replies submitted by janhardo

@acer 
Thanks

Looking to this explanation ...complicated

Compared with the original bookprogramming is this new programming more advanced , because the intervals for x, y and z  for the 3 axis by a given  input  array are also calculated  by the "view "code in the procedure.

Only how the view code this handles seems to be complicated. 

 

 

 

@acer 

Thanks
I agree with you, to stay in a context for better understanding

@Carl Love 

Thanks

Works great , its the wireframe what's doing the job.
To program this from scratch could be complex to figure out.

Its shows the domain for the planes and compaired with the bookprogramming example, this is so much better.

@janhardo 

It is that the x-axis and y-axis are not visible anymore

 

  restart;
  with(plots):
  T:=Array([[1,2],[1.5,1]]):
  rooster:= plot3d(0,x=0..2, y=0..2,grid=[3,3],color=white):
  display
  ( rooster, [ seq
      ( seq
        ( plot3d
          ( T[i,j],
            x=i-1..i,
            y=j-1..j,
            shading=zhue,
            style=surface,
            axes=normal,
            view=[0..2,0..2,0..2]
          ),
          i=1..2
        ),
        j=1..2
      )
    ]
  );

 

 


 

Download arrplot2domain.mw

@acer 
Thanks

Maybe i can solve this learned by other tasks ?

The domain of a f(x,y) in plot3d is a set of points
Drawing the points with a seq statement..

@tomleslie 

Thanks

Its trivial and straight on for you, but  i need to analyze it compared with the bookexample.

Note:  also for teaching it is not advisable to stress out: how easy or trivial it is for students if they are in their learning process: it can make them unsure. 
Mostly youngster are susceptible for this. (secondairy schools) 
Not everyone can teach.

Your programming looks easier, but its not formulated as a step function. 
Also a domain roster should be informative

In the bookprogramming there is a domain checking, but in this procedure it works differently

 

g:=(x,y)->f(A,B,T,x,y);  with f as procedure

 

h:=(x,y)->doPlot(T);

@tomleslie 

Thanks

Looks good!

Yes, its now indeed a real stepfunction with isolated step area's : what i want.
Also the scaling of the xyz axis is now correct

And no showing domain anymore is now correct and perhaps however adding roster of gridlines to show the domain 
 

No nested do loop and if statements anymore , it looks easier your code,but its not a general procedure yet and making one could be complicated?
 

Note: I try to decipher in the programming book also how the first programming example is set up

@rlopez 

Thanks 

Now i know what's possible. 

@Carl Love 

Thanks

How this statement exactly is build up stays unclear for me.

The piecewise function must for x-values accept : numeric values
Function notation this  must be possible to executed in a plot statement.: plot(h(x) and plot (h) is possible

@Carl Love 

Thanks

Yes, its no problem with the piecewise statement as it works as you mentioned, but the programmingbook likes to program this as exercise
 

@janhardo 

h:= x->`if`( type(x, numeric), 
               piecewise( x<=0,
                          sin(3*x),
                          sin(x/3)
                        ),
              'h(x)'
             ):
Strange maple expression for h  ..thought that i was meant for function definition ( functional oper)ator
Its a if ( condition, function, else...)
Seems that   if   is true then a function in x is created   
 

 

@tomleslie 

Thanks

It was about evaluating rules.

But your programming is a big difference with my example from Maplev5/6 .
To use only expressions in piece-wise functions. 

@acer 

Its not clear how this mechanism works ( R,P)

With this together probably return A[1..n+1,..], P;

(R1,P1):=NewtonM(g,-1,1,1,100,1e-6):

Your note:

note: You don't have to have the procedure return the plot. Given the returned Matrix that was assigned to R4 (for example), you can also get the plot afterwards like this:

Why should i do this ? : i can ask for R4 and P4

@Carl Love 

Thanks

A clear example, but not al my questions are answered.

Another question came up : can i see in a procedure what are the return values? ( automatically)
The last statement in the procedure is the return value, so if there is plot return value, before the last  statement.
Then i must use then add a return statement after the plot statement in order to see the plot in the procedure i think.
 

 

 

 

 

 

@janhardo 

Also this in another procedure: the use of p, L ?

p,L:=approxL( f, a, b, N):
#
# Display function and "piecewsie approximation
# to function
#
  p;
  L;
 

First 63 64 65 66 67 68 69 Last Page 65 of 79