Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How do I access numerical formatting from command line?

The help page shows you how to use the point and click menus to change the numerical formatting. It works fine but I want a command to convert from say decimal to scientific notation. Am I missing something?

Here the gui menu on the right hand side of a typical worksheet.

This is the help page for "Numerical Formatting" but there is not much about commands, just the point and click menus. If anyone knows where to search for these commands, please respond. Thanks.

https://maplesoft.com/support/help/maple/view.aspx?path=worksheet/expressions/numericformatting

Hi.  I am using the linux version of Maple.  I seem to experience more bombs in Maple/Linux vs MathCad/Windows.  The program just froze as I was entering text.  Just text.  It is not a disaster since I make very frequent saves.  But it is very annoying.  I was a heavy user of MathCad from about 2005 to 2019.  In the early days, it bombed a lot.  But I do not recall that it ever bombed when I was entering text.  Any suggestions?  Would there be a limition on the number of text characters?  Is it Linux?  Other than this problem, it is a great program.

Hi,

I have been looking for a solution to my problem since last night, but I have been unsuccessful. My problem is that the Column command is not recognized in some Maple worsheets. This problem might occur with other commands too, but most commands seem to work fine. It also only seems to happen in some (not all) worksheets. I just tried creating a new Maple sheet where all I do is create a 2x2 matrix and apply the Column command, but the command is not recognized.

Any ideas? Thanks.

John

Hi, I'm begginer to Maple,

I imported matrix from csv file by this comand:

tab1:= ImportMatrix(source,skiplines=1);
and some of the parts of the source csv file are blank. can i replace these places in matrix with zero somehow please?

Thank you for your answers.

 

The Examples section on the help page of a command is important for learning, but cannot cover all uses. This is especially true for general purpose commands like "solve" or "simplify". Searching all help pages that contain the word "solve" results in too many irrelevant hits that do not contain examples.

Why does adding a bracket to a command not filter for help pages with examples using the command?

Inside a help page Find/Replace finds such strings.

Hi, guys. 

I have a question with D(D)^k, where D is a diagonal matrix,k>=0,for example

D:=<<6, 0> | <0, -1>>

I want Dk to be simplified to the form

<<6k, 0> | <0, (-1)k>>

How can I get it?

TKS in advance!

Hello,

Is it possible to have a common legend for different figures? I can plot them as Array of Plots (below) but then they each have a legend. 

Is it possible to have the two figures side by side and a common legend in the middle?

Thank you!

restart:
with(plots):
A := Array(1 .. 2):
A[1] := plot([2*sin(x), 3*sin(x)], x = -Pi .. Pi, labels = [x, b*sin(x)], color = [blue, red], legend = ["Case of b=2", "Case of b=3"]):
A[2] := plot([2*cos(x), 3*cos(x)], x = -Pi .. Pi, labels = [x, b*cos(x)], color = [blue, red], legend = ["Case of b=2", "Case of b=3"]):
display(A);

Recently, I tried to write a function to get the lexicographic product of two graphs.

In  graph theory the lexicographic product G ∙ H of graphs G and H is a graph such that
  • the vertex set of G ∙ H is the cartesian product V(G) × V(H); and
  • any two vertices (u,v) and (x,y) are adjacent in G ∙ H if and only if either u is adjacent with x in G or u = x and v is adjacent with y in H.

I'm trying to write this function as defined after making sure it doesn't exist in maple. I saw a similar post by mathematica stack.

There are many answers in the post, the most interesting to me is the following code, which follows the definition of lexicographic product. 

lexicographicProduct[g1_?UndirectedGraphQ, g2_?UndirectedGraphQ, opt : OptionsPattern[]] := 
 RelationGraph[
   (* two nodes are connected if their corresponding nodes in the first graph are connected *)
   EdgeQ[g1, First[#1] \[UndirectedEdge] First[#2]] || 
   (* or their corresponding nodes in the first graph are the same and their corresponding nodes in the second graph are connected *)
   (First[#1] === First[#2] && EdgeQ[g2, Last[#1] \[UndirectedEdge] Last[#2]]) &,

   (* the vertices are the cartesian product of the two vertex sets *)
   Tuples[{VertexList[g1], VertexList[g2]}],

   (* also allow setting graph options *)
   opt
 ]

lexicographicProduct[CycleGraph[5], CycleGraph[3]]

It utilizes the  function RelationGraph in Mathematica. I feel that this function is generic in nature. So here I would ask maple if they had a similar function.

Function RelationGraph is to generate a graph based on data and a binary relation.

For example, using RelationGraph  I  can get easily  the kth power Gk of an graph G which is another graph that has the same set of vertices, but in which two vertices are adjacent when their distance in G is at most k.

Dis[g1_?UndirectedGraphQ, k_] := 
 RelationGraph[
  GraphDistance[g1, #1, #2] <= k && GraphDistance[g1, #1, #2] != 0 &, 
  VertexList[g1]]
Dis[PathGraph[Range[10]], 2]

If I use maple and do not use the built-in function GraphPower, I might deal with the following.

with(GraphTheory):
with(SpecialGraphs):
graphpower:=proc(G,k):
local choo,edge,vex,g;
 vex:=convert(Vertices(G),list);
 choo:= choose(vex, 2):
 g:= Graph(Vertices(G)):
 for edge in choo do 
     if Distance(G, edge[1], edge[2])<=k  then 
        AddEdge(g, convert(edge,set))
     fi;
  end do:
 return g;
end proc:
s:=graphpower(PathGraph(10),2);DrawGraph(s)

 

 

I believe if the RelationGraph function can be  implemented in maple, the function lexicographicProduct would be easier to obtain.

Hey, guys! My Maple 2020 program does not build a plot. that is, it cuts it off. everything is correct in maple 2015.

plot(140^t*exp(-140)/t!, t = 0 .. 300)

Maple 2015

plot(140^t*exp(-140)/t!, t = 0 .. 300)

 

My maple 2020 creates

 

 

Why???????????

 

How do we plot the least integer function [x]?

I am referring to a function with the following graph

Declaring types of arguments of a procedure or checking type of something when working with lists or Arrays is easy. For example one can easily use A :: list( posint ) or type( B :: 'Array'( polynom ) ), but with MutableSet, the same approach ends with an error;

Error, module does not have a ModuleType member to accept structured type arguments.

I guess it is the same for other objects defined as a module with option object. Is there a recommended way to have type declaration for such objects or MutableSet in specific?

Dear Mapler

I have an expression that consist of power of main variable x. I aim to fetch the coefficient of square root of x for example. I get an error when I am using COEFF(esp, sqrt(x))

Is there any solution?

For a long time I could not understand how to make a kinematic analysis of this device based on the coupling equations (like here). The equations were drawn up relative to the ends of the grips (horns), that is, relative to the coordinates of 4 points. That's 12 equations. But then only a finite number of mechanism positions take place (as shown by RootFinding[Isolate]). It turns out that there is no continuous transition between these positions. Then it is natural to assume that the movement can be obtained with the help of a small deformation. It seemed that if we discard the condition of a constant distance between the midpoints of the horns (this is the f7 equation at the very beginning), then this will allow us to obtain minimal distortion during movement. In fact, the maximum distortion during the movement was in the second decimal place.
(It seemed that these guys came to a similar result, but analytically "Configuration analysis of the Schatz linkage" C-C Lee and J S Dai
Department of Tool and Die-Making Engineering, National Kaohsiung University of Applied Sciences, Kaohsiung, Taiwan Department of Mechanical Engineering, King’s College, University of London, UK)

The left racks are input.


The first text is used to calculate the trajectory, and the other two show design options based on the data received.
For data transfer, a disk called E is used.
Schatz_mechanism_2_0.mw
OF_experimental_1_part_3_Barrel.mw
OF_experimental_1_part_3.mw

Highlights of the 2021 Maple Conference are now available. These include recordings of the keynote presentations, contributed sessions, and discussion panels, as well as the Art Gallery entries.

We encourage you to submit a presentation proposal or artwork to our 2022 Maple Conference by visiting the links below!
Call for Participation (proposals due July 18)
Call for Creative Works (submissions due September 22)

When I export a very simple Maple 2018 (MaxOS) document to Latex, this tex file results:

 

%% Created by Maple 2018.2, Mac OS X

%% Source Worksheet: untitled 3

%% Generated: Sun Jul 03 16:34:49 CEST 2022

\documentclass{article}

\usepackage{maplestd2e}

\def\emptyline{\vspace{12pt}}

\begin{document}

\pagestyle{empty}

\DefineParaStyle{Maple Bullet Item}

\DefineParaStyle{Maple Heading 1}

\DefineParaStyle{Maple Warning}

\DefineParaStyle{Maple Heading 4}

\DefineParaStyle{Maple Heading 2}

\DefineParaStyle{Maple Heading 3}

\DefineParaStyle{Maple Dash Item}

\DefineParaStyle{Maple Error}

\DefineParaStyle{Maple Title}

\DefineParaStyle{Maple Text Output}

\DefineParaStyle{Maple Normal}

\DefineCharStyle{Maple 2D Output}

\DefineCharStyle{Maple 2D Input}

\DefineCharStyle{Maple Maple Input}

\DefineCharStyle{Maple 2D Math}

\DefineCharStyle{Maple Hyperlink}

\begin{Maple Normal}{

\begin{Maple Normal}{

\mapleinline{inert}{2d}{restart; 1}{\[\displaystyle \]}

}\end{Maple Normal}

}\end{Maple Normal}

\begin{Maple Normal}{

\begin{Maple Normal}{

\mapleinline{inert}{2d}{a := b^2-sqrt(4); "_noterminate"}{\[\displaystyle \]}

}\end{Maple Normal}

}\end{Maple Normal}

\begin{maplegroup}

\begin{Maple Normal}{

\mapleinline{inert}{2d}{a := b^2-sqrt(4); "_noterminate"}{\[\displaystyle \]}

}\end{Maple Normal}

\mapleresult

\begin{maplelatex}

\mapleinline{inert}{2d}{a := b^2-2; "_noterminate"}{\[\displaystyle \]}

\end{maplelatex}

\end{maplegroup}

\begin{Maple Normal}{

\begin{Maple Normal}{

\mapleinline{inert}{2d}{a := b^2-sqrt(4); "_noterminate"}{\[\displaystyle \]}

}\end{Maple Normal}

}\end{Maple Normal}

\begin{maplegroup}

\begin{Maple Normal}{

\mapleinline{inert}{2d}{a := b^2-sqrt(4); "_noterminate"}{\[\displaystyle \]}

}\end{Maple Normal}

\mapleresult

\begin{maplelatex}

\mapleinline{inert}{2d}{a := b^2-2; "_noterminate"}{\[\displaystyle \]}

\end{maplelatex}

\end{maplegroup}

\begin{Maple Normal}{

\begin{Maple Normal}{

\mapleinline{inert}{2d}{}{\[\displaystyle \]}

}\end{Maple Normal}

}\end{Maple Normal}

\end{document}

 

However, when trying to process the tex file in both Overleaf and TexShop the pdf output is only an empty page. No error occurs, i.e. the maplestd2e.sty file is recognised by both Overleaf and TexShop.

 

What is going wrong here?

First 175 176 177 178 179 180 181 Last Page 177 of 2097