Items tagged with display display Tagged Items Feed

If I want to make a display of data, say 2 columns of data, with a heading on top of each column, how would one go about this in Maple? This will be for display purposes only (say for final result of a homework result, etc..)  

In Mathematica, I use the Grid command. I am not sure how to do this in Maple. I could not find Grid like command in Maple.

I can generate the data in 2 sequences  in Maple, but need to insert a heading, and also need to insert frame around eveything.

Here is an example:

f:=x->x^2;
g:=x->x^3;
data=[seq([i,f(i),g(i)],i=0..5)];
    #data = [[0, 0, 0], [1, 1, 1], [2, 4, 8], [3, 9, 27], [4, 16, 64], [5, 25, 125]]

The above data has 3 columns, 6 rows. I need to insert first row also called {"index","f","g"} and then display all in nice table form. This is how I would do the above in Mathematica to give idea of what I looking for

f[x_] := x^2;
g[x_] := x^3;
data = Table[{i, f[i], g[i]}, {i, 0, 5}]
    (* {{0, 0, 0}, {1, 1, 1}, {2, 4, 8}, {3, 9, 27}, {4, 16, 64}, {5, 25, 125}} *)

And this is below the part I do not know how to emulate in Maple:

data = Insert[data, {"i", "f(i)", "g(i)"}, 1]
    #   {{"i", "f(i)", "g(i)"}, {0, 0, 0}, {1, 1, 1}, {2, 4, 8}, {3, 9, 27}, {4, 16, 64}, {5, 25, 125}}
    # now use Grid to format with frame around everything
Grid[data, Frame -> All]

Hello,

I need your help to display the matrix generated by a lenear system.

The linear system is okay, well written, but  there is an error in generate matrix, I get the wrong matrix.

Thank you very much for your help.

 

test.mw

Mytest:=module()
    option package;
    
    export
        mymain
        ;
        
        
    # local a,b,c;

    uses LinearAlgebra;
    
    interface(rtablesize=infinity);
    
    
    mymain:=proc(n::integer)

        local ans;
        
        ans:=Vector(n);

        return ans;

    end proc;

end module;

Here is a short piece of code to create a Maple package. It runs fine. Is that possible to hide the code from print() ?

 

with(Mytest);

print(mymain); # which displays the source code

 

Could I hide some of the code? Say I want to use the function mymain() for debugging purpose, but I dont want to make it local to the package. Instead I keep it in "export", but I dont want users to see its code.

 

Thanks!

Hi,

I'm using my own Maple package to make questions in Maple T.A.. I'm working with finite automata so I'd like to draw graphs in the text of the questions. I have a function that draws automata, it uses plots:-display as it's output. Is there a way that I can use plots:-display in plotmaple, like this? (This is example doesn't work, I'd like to know why and how I have to modify it.)

$circ=maple("geometry:-circle('Circ', [geometry:-point('PP',0,0),3]);
DRA:=geometry:-draw(Circ);
DISP:=plots:-display(DRA);
DRA;");
$plo=plotmaple("plots:-display($circ),plotdevice='gif', plotoptions='height=250, width=250'");

Thank you for the answers.

hi,

I am trying to plot the polygon but it isnt working. Please help

 

i put

triangle := polygonpolt3d ([13,11,12], [16,10,18], [14,10,7]) :

display3d (triangle)

Hello,

I have a little question about the display of the kinematic joints which are usually in red.

I didn't know why the kinematic joints have disappeared and I don't know how to display them again.

Do you have an idea about the button I have to use so as to display the kinematic joints.

Thanks for your help.

This is a typical problem of what I find when learning DynamicSystems. Basically, I create number of systems by changing one paramter (the damping ratio in this case) and want to plot the unit step of all of them on the same plot to compare the effect of the damping ratio.

I setup the TransferFunction, used Simulate to obtain the response of each to the same input. The problem comes when I want to plot the respones.  I have to use plot[odeplot] it seems. But this only like to take one response at a time.

I can't use plot() since I do not have the actual function of the response in time. Unless I try to extract the differential equation from the sytem object, solve that and get a solution then use plot(). But if I do all of this, what do I need DynamicSystems in first place? 

I will show what I tried. I am sure there is some way to do this in Maple I just do not know yet the correct function or setup.

restart;
alias(DS=DynamicSystems);
H:=(w,zeta)->w^2/(s^2+2*zeta*w*s+w^2);
sys:= (w,zeta)->DS:-TransferFunction(H(w,zeta)):
sol:=seq(DS:-Simulate(sys(1,zeta),Heaviside(t)),zeta=0.1..1.2,.2):

Now I want to plot all the solutions in sol. I wanted to use plot(...) only to be able to obtain the automatic coloring of each solution.

If I try to use plots[odeplot], it works, but only on one at a time:

plots[odeplot](sol[1],t=0..10);

If I try this, it fails:

plots[odeplot]([sol],t=0..10);

I can get each plot separatly and then use display() but then lose the automatic coloring of the lines:

plots:-display(seq(plots[odeplot](sol[i],t=0..10),i=1..nops([sol])));

I am looking for the above plot, but have the lines each colors differently. I also need to figure how to add legend later. But one step at a time. I can't hard code the color in the plots[odeplot] call itself, since I do not know what color to give each line. plot([....],t=0..) allready does this automatically. But I can't use it!

Just to give an idea of the kind of plot I am trying to obtain, here it is in Mathematica:

sys = TransferFunctionModel[w^2/(s^2 + 2 z*w*s + w^2), s];
zValues = Range[.2, 1.2, .2];
fun = OutputResponse[sys /. {w -> 1, z -> #}, UnitStep[t], {t, 0, 12}] & /@ zValues;
Plot[Evaluate@Flatten@Table[fun[[i]], {i, 1, Length[fun]}], {t, 0, 12}, Frame -> True, PlotRange -> {{0, 12}, {-.1, 1.7}}]

 

 

 

according to

http://www.maplesoft.com/support/faqs/detail.aspx?sid=32658

But the above does not work in Maple 18, windows: (I use worksheet)

restart;
assume(z>0):
interface(showassumed=0):
z;

Only the other solution works, which is using options->display->turnoff assumed variables tilda.

Why does not the above command work?

Rounding numbers...

July 29 2014 casperyc 892

restart:

a:=0.0000000000000000000000213123123;

evalf[3](a);

I think the above is the same as if I were to change the precision tab, to display 3 decimals.

Is there a way to ask Maple to display it as  (printf(  "%3.3f",a);)

0.000

But I want this as a standard Maple ouput.

and I am not just working with a single scalar, I need something that works for a Vector, Matrix, and perhaps, in general.

 

Thanks,

 

casper

Dear all,

I tried to display an animation which can zoom as the time goes.

But it seems that if I display several animations in one plot window, it will display the animation with the maximum view size from these animations, not separately display these animations with their view size.

 

There are two examples:

Case1,

a1 := animate(plot, [x^2, x = -1 .. t, view = [-1 .. 1, 0 .. 1]], t = -1 .. 1);

a2 := animate(plot, [x, x = -1 .. t, view = [-1 .. 1, -1 .. 1]], t = -1 .. 1);

display(a1, a2);

 

Case2,

animate(plot, [x^2, x = -1 .. 1, view = [t .. 1, 0 .. 1]], t = 0 .. -1)


Is it possible to zoom the animation with time? What parameter should I set?

The related maple file is attached.

zoom_animation_with_time.mw

Hi everyone,

I'm running Maple 18 and MapleSim 6.4 on my macbook pro 13 " with retina display and the GUI is blurred like there is no smoothing or the antialiasing is not working properly. I tried to find something helpfull in the setting but with no luck.

Is there something I can do to fix this?

Thanks

Carlo

Hi all,

I ploted the cylinder like this:

with(plottools);
with(plots);
display(cylinder([1, 1, 1], 1, 3), orientation = [45, 70], scaling = constrained, grid = [2, 2, 2]);

 

Is it possible to export nodal points of the plot?

Thank a lot.

Sorry if this has been already posted.

 

When print() is invoked from a proc into a module, non-English characters are not properly displayed with Maple 18.

It works ok if it is invoked from within the workbook.

 

Example:
print("Están en perspectiva")

Put this sentence in a proc into a module and the character "á" wont be displayed

Output: "Est�n en perspectiva"

Any hint about how to treat this issue?

Thank you very much.

César Lozada 

 

 

I have a worksheet. I edit some variables' value. I then execute the whole worksheet to see how the graphs change. But the graphs generated by display command do not appear. All other calculations update fine. 

To overcome this. I save worksheet with my new variable values. Close the worksheet. Reopen it. Execute it. And now the graphs appear fine.

 

Hi,

I want to display the matrix M, I used return M, in this procedure, but no matrix M displayed.

restart;
N:=2:
N:=2;
ff:=proc(N)
local M,i,p;
M:=array(1..2*N+1,1..2*N+1):
for i from 1 to 2*N+1 do
for  p from 1  to 2*N+1  do
   if p=1 then M[p,i]:=-2;
    elif  p=2*N+1  then M[p,i]:=-3;
else
M[p,i]:=0;
end if; end do; end do;
return M;
end proc;

 

Many thinks

1 2 3 4 5 6 7 Last Page 1 of 46