MaplePrimes Questions

Hello

I want to know if there is any option to convert the Maple code into MATLAB version to work across platforms. I have tried the code generation option in Maple and I could not understand how to use the single line code generated. I am working on an already written Maple code and conversion of code to use on both platforms is kind of important. Please advice me on the same.

Regards!

I have a string which includes characters from the extended ASCII character set. I simply want to print the string. Nothing fancy. Hence my question is: how does one print characters from the extended ASCII character set so that they show up as the characters and not a bunch of empty boxes?  (A technique for UTF-8  character printing would be a bonus.)   

<Edit> For example, in integers, my string could be:

s := [56, 72, 157, 38];

Hence there printing of s as a string should be a 4 character / bytes entity: 

printf("%s", convert(s, bytes));

 

I work with polarization in optical fibers.  I want to (theoretically) scramble the polarization and cover the entire Poincare sphere with several thousand points using a sequence of two variable retarders.   So looking at the Mueller matrices in the attached image, as I vary the arguments of the sin & cosines, I’d like to see the polarization states traced out on the Poincare sphere.    Has this already been done in Maple, as in some kind of canned routine or add-on module?

Thanks!

Hi, 

While "numpoints=..." is said to be an admissible option of SurfaceOfRevolution (or VolumeOfRevolution, default value set to 50), the graphical results doesn't account for the value of numpoints.

Is this a known issue?

TIA

Surface0fRevolution.mw



 

Hello everyone, 

 

I am seeking for help!

You can freely access the mentioned file in any of the following links:

https://www.mdpi.com/2076-3417/9/15/2996

https://www.mdpi.com/2076-3417/9/15/2996/pdf

https://www.researchgate.net/publication/334711617_Transverse_Vibration_of_Clamped-Pinned-Free_Beam_with_Mass_at_Free_End

 

I have a/L a parameter. Give it a value and then beta can be calculated as in Table 1. The first five lowest physically possible values are listed only, but the number of beta-s tend to infinity because of the sine/cosine functions. (22) is clearly a nonlinear equation. As such, in general, it can't be solved analytically. (Of course, e.g., sin(x)=0 is also nonlinear but has analytical solution, but (22) is much more complicated.)
At first step, I give a/L  a value, 0.6 , then plot the left side of (22) and try to read the zeros. Here, beta on the horizontal axis is the independent variable. This method is really slow and inaccurate to get all the results of Figure 2. Instead, I should find the roots numerically by using a built-in solver in Maple.

Once I am done with the above, I should add a do/for loop for the parameter a/L. HOWEVER, I DO NOT KNOW HOW TO DO.

In conclusion, the main question is: How could I plot the graph using MAPLE in Figure 2 considering the transcendental Equation (22)?

Best Regards, 

Wallyson Thomas

restart;
with(GraphTheory);
with(SpecialGraphs);
with(StringTools);
GT := GraphTheory;
G := GT:-SpecialGraphs:-GridGraph(3, 3);
G := Graph(AdjacencyMatrix(G));
H := GT:-SpecialGraphs:-GridGraph(3, 2);
H := Graph(AdjacencyMatrix(H));
GH := CartesianProduct(G, H);
V := Vertices(GH);
P := [];
flag := 0
f := proc(K::string) local L; global P; L := Split(K, ":"); P := [op(P), cat("(", L[1], ",", L[2], ")")]; end proc
if flag = 0 then
    for i to NumberOfVertices(GH) do f(V[i]); end do;
end if
GH := RelabelVertices(GH, P)
DrawGraph(GH, stylesheet = "legacy")
 
I need the graph with those exact relabed vertices type i have done

Now the problem i want my graph a little better in output  i want my vertices a better visible the edges as they more not a issue atleast want the verices a little more visbile and distictive  kind help i apologize for the distubance kind help

the below is output i get i want it more better

Dear experts;

I would like to know the angle between lines P0-P1 and P0-P3. I believe I need to solve for all the angles to get this.

I have attempted to set this up in maple but... maple doesn't like what I've done. Can you tell me what I've done wrong?

geometry.mw

Hi,

It seems that plottools:-extrude doesn't support the "style" option: no error returned, just the extusion being always of surface style.
Am I correct ?

G := GridGraph(3, 3);
 DrawGraph(G);

Now in place  of (1,3) i want label 1 , in place  of (2,3) i want label 2, in place  of (3,3) i want label 3, in place  of (1,2) i want label 4, in place  of (2,2) i want label 5,in place  of (3,2) i want label 6,in place  of (1,1) i want label 7,in place  of (2,1) i want label 8,in place  of (3,1) i want label 9

And i want the graph to straight like the above and the edges should be correct and strainght kind help

 

Similary for below

 

G := GridGraph(2, 3);
 
DrawGraph(G);

 

 

Now in place  of (1,3) i want label 1 , in place  of (2,3) i want label 2, in place  of (1,2) i want label 3, in place  of (2,2) i want label 4, in place  of (1,1) i want label 5, in place  of (2,1) i want label 6

 And i want the graph to straight like the above and the edges should be correct and strainght kind help 

 

Kind help in such vertex labeled graph outputs and graphs should be strainght with edges and presented

If i can get both in legacy mode the above all in the above form in the legacy mode it will be more good as i want the color etc like that in my output exactly

 

kind help  i apologize for the disturbance kind help please

Vertices should not have have any of the (1,1),(2,1) etc in the output it should be labeled with the vertex labels as told in that order

And the edges straingth and good.

 

kind help  i apologize for the disturbance kind help please

Hi to all! 

I have the following problem: I need to compute the Hilbert Polynomial of the polynomial ideal ((y-xn)*(y^2-xm)), where the variables are x and y while m and n are parameteres. So, i need the Hilbert Polynomial deending by n and m. Unfortunately i don't know how to "say" to Maple that it have to consider x and y as variabled and m and n as paramaters. Can i do this?

 

Thanks to all!

I like to show a domain as a roster of gridlines
The plotbuilder has not this option gridlines , so i must program this ?

How would you highlight specific numbers in a list?
For example, using
a:=[1,3,4,5,3,4,9,4,5,3,9,2,3,4,2,5,21,32,22,12,15,3,2,5,4]

Highlight all the 5's in the list to red for example like this

            

 

I have 2   equations that must be zero, and 2 ODE's for phi and theta

Vector(2, {(1) = `&varphi;`(tau)-1.5*sin(`&vartheta;`(tau)), (2) = -`&varphi;`(tau)^2+1.5*cos(`&vartheta;`(tau))})

how can i implement this quations with event statment .  this dose't work

 

event1 := [[`and`(gln[1], gln[2]), halt]]

 

 

A complicated programmed task for me
I must analyze this 

In this plot there are vertical  walls connected with the step area's , but that its not wanted.
Also the domain is showed by adding 0 in the plot 3d( {0, 'g(x,y)'}, ...) and this distract the plot with the step area's
Its not needed the domain in the plot ( in order to get the 0 value for z )     

The 3 axis x,y,z  are not visible in the plot 
Seems to be not complete programmed as it just to be.


 

restart

 

f:=proc(A,B,T,x,y)

     local n,m,i,j,val;

     n:=nops(A);m:=nops(B);

       for i from 1 to n-1 do

         for j from 1 to m-1 do

         if (A[i]<=x and x<A[i+1]) and

            (B[j]<=y and y< B[j+1]) then val:=T[i,j];

         end if;

          end do;

       end do;

     val;

   end proc:

 

 

A:=[0,1,2];B:=[0,1,2];T:=array([[1,2],[1.5,1]]);

A := [0, 1, 2]

 

B := [0, 1, 2]

 

array( 1 .. 2, 1 .. 2, [( 2, 1 ) = (1.5), ( 1, 1 ) = (1), ( 2, 2 ) = (1), ( 1, 2 ) = (2)  ] )

(1)

 

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

proc (x, y) options operator, arrow; f(A, B, T, x, y) end proc

(2)

 

plot3d({0,'g(x,y)'},x=0..2,y=0..2,axes=normal,
           scaling=constrained,orientation=[-37,75],
           projection=0.8,tickmarks=[3,0,2],
           shading=XYZ,lightmodel='light3');

 

 


 

Download texc_set_4_-task_3_-forumvraag.mw

 

First 410 411 412 413 414 415 416 Last Page 412 of 2308