Maple 2016 Questions and Posts

These are Posts and Questions associated with the product, Maple 2016

How can I get the equation G1 automatically shown in Latex as stated? Example:

G1 := V = Pi*(d/2)^2*h;

latex(G1);

# yields V=1/4\,\pi\,{d}^{2}h

rendered:

 

 

How can I make G1 inert so that Latex generator accepts it as input?

I have data matrix in text file.

I opened it with Maple and replaced decimal commas to decimal points + replaced column separator to semicolon.

Then I set 'Convert to plain text'.

After these modifications, I would like to export that Maple worksheet back to .txt  file with content exactly as shown on the display.

But if I export the worksheet as Maple text, extra pound signs are added to the beginning of each row. In this case I cannot import data to matrix datatype=float.

If I export the worksheet as Plain text, all the rows are destroyed and I cannot import data into matrix as well.

How can I export worksheet content, exactly as shown on display, into text file?

I attempt to get two (or better, three) datas from an XLSM file. The tools doesn't work. I want then to do some tests about the apparied datas extracted.

Could you help me ? The best I did was getting a matrix result from an XLS (and not XLSM) file, and I don't know what to do with this kind of result, as I want only test some hypothesis as a linear regression with or without least squares, not do learn what to do with this matrix result..

Thx to you,

Milos

The problem that I'm asking about here doesn't show in the MaplePrimes display of the worksheet below; you'll need to download the worksheet to see it. The problem is that the last subsection (which is currently empty) overlaps with the second-to-last subsection. It also overlapped when it was not empty. I just want to delete that last subsection, but nothing that I've tried works. This is not the first time that I've had overlapping subsections, but previously I've always been able to fix the problem by closing and re-opening the worksheet. That doesn't work in this case.

ReparamT.mw: A scratch space for testing NewSLO:-reparam

Modify at will.

Created by Carl 2016Jun17.

 

Important: If any change is made to KB.mpl or NewSLO.mpl then before running this worksheet

1. Restart all open Maple sessions.

2. From the command line, run "cmaple -q < update-archive.mpl".

 

restart;

dir:= "C:/cygwin64/home/owner/hakaru/maple/":

Load:= proc(package::symbol) read ""||dir||package||".mpl" end proc:

 

with(NewSLO);

with(KB);

Load(ReparamT);

 

Passed cases

   

Cases being worked on

 

infolevel[reparam]:= 2:

 

Linear fractional transformation (LFT) with symbolic coefficients

   

LFT with explicit coefficients

   

Simplest nonlinear LFT: 1/x

   

Symbolic constant multiple

   

Two-variable LFT with Gamma

   

Two-variable constant multiple with ChiSquare and Standard Normal

   

(t16) Sum of std normals to Normal(0, sqrt(2))

   

(t20) Sum of n Bernoullis to Binomial

   

(t23) Sum of Exponentials to Gamma

   
 
   

 

Download ReparamT.mw

Hello people in mapleprimes,

 

I have a question. I hope someone give an answer to me.

rho:=sqrt((x-a)^2+(y-b)^2);

limit(x-a+y-2,rho=0);

 

brings an error

Error, invalid input: limit expects its 2nd argument, p, to be of type Or(name = algebraic, set(name = algebraic)), but received ((x-a)^2+(y-b)^2)^(1/2) = 0

Isn't other way than the following?

limit(x-a+y-2,{x=a,y=b});

 

Best wishes.

taro

I'm trying to call a C function which returns an array. The example on the help page http://www.maplesoft.com/support/help/maple/view.aspx?path=examples/ExternalCalling is to pass in an array with known dimensions, which will be updated in the C function, but I wonder if this is the only way to do it. For example if I have an array of unknown dimensions beforehand, what is the best approach to return this array?

Thanks!

Aggregate statistics are calculated by splitting the rows of a DataFrame by each factor in a given column into subsets and computing summary statistics for each of these subsets.

The following is a short example of how the Aggregate command is used to compute aggregate statistics for a DataFrame with housing data:

To begin, we construct a DataFrame with housing data: The first column has number of bedrooms, the second has the area in square feet, the third has price.
 

bedrooms := <3, 4, 2, 4, 3, 2, 2, 3, 4, 4, 2, 4, 4, 3, 3>:
area := <1130, 1123, 1049, 1527, 907, 580, 878, 1075, 
         1040, 1295, 1100, 995, 908, 853, 856>:
price := <114700, 125200, 81600, 127400, 88500, 59500, 96500, 113300, 
          104400, 136600, 80100, 128000, 115700, 94700, 89400>:
HouseSalesData := DataFrame([bedrooms, area, price], columns = [Bedrooms, Area, Price]);

Note that the Bedrooms column has three distinct levels: 2, 3, and 4.

convert(HouseSalesData[Bedrooms], set);

The following returns the mean of all other columns for each distinct level in the column, Bedrooms:

Aggregate(HouseSalesData, Bedrooms);

Adding the columns option controls which columns are returned.

Aggregate(HouseSalesData, Bedrooms, columns = [Price])

Additionally, the tally option returns a tally for each of the levels.

Aggregate(HouseSalesData, Bedrooms, tally)

The function option allows for the specification of any command that can be applied to a DataSeries. For example, the Statistics:-Median command computes the median for each of the levels of Bedrooms.

Aggregate(HouseSalesData, Bedrooms, function = Statistics:-Median);

By default, Aggregate uses the SplitByColumn command to creates a separate sub-DataFrame for every discrete level in the column given by bycolumn.

with(Statistics);
ByRooms := SplitByColumn(HouseSalesData, Bedrooms);

We can create box plots of the price for subgroups of sales defined by number of bedrooms.

BoxPlot( map( (m)->m[Price], ByRooms), 
             deciles=false, 
             datasetlabels=["2 bdrms", "3 bdrms", "4 bdrms"], 
             color=["Red", "Purple", "Blue"]);

 

I have recorded a short video that walks through this example here:

The worksheet for this example can be downloaded here: Aggregate.mw

When using seq function below in the second call, it does not generate a sequence of functions with 'a' being 1, 2, and 3, and I had expected. 

First seq function call is just to show that it works without the function "x ->" wrapping.

I could of couse use unapply as in the third call, but I had expected the second call to work.

Am I doing anything wrong, or is this a Maple bug?

#Hello people in Mapleprimes,

#After

restart;interface(typesetting=extended);

diff(f(x),x);

#shows f'(x).

#But,

diff(f(t1),t1);

#shows just df(t1)/dt1, not f'(t).

#Can't I show f'(t1) not df(t1)/dt1?

#Is this a way peculiar to Maple?

#I hope someone could give me some hints.

 

#Best wishes.

#taro

 

 

 

 

When using units, then e.g. "2 m" is show as expected below, but "1 m" shown as only "m".  Even through correct, it is a non-standard way to write physical values.

How to get the physical values in a format of "{numerical} {unit}" even when the numerical part is 1?

I am quite a new user of Maple 2016.

I intend to plot complex numbers as vectors (Phasors), with diferent relationsships between them. I would like to use parameters and modify them e.g with a slider. I can't find how to do it. 

 

For example:

V1=1*cos(delta)+j*sin(delta)

Ve=0.5*cos(alfa)+0.5*j*sin(alfa)

V2=Ve+V1

V2=1+j0

V12=V1-V2

I=V12/(Zcos(beta)+jZsin(beta))

I would like to be able to see those vectors, employing alfa and beta as parameters (e.g between -pi and pi)

 

Any ideas on how to plot that? Maybe Maple is not the right tool to do it. Is there any specific to plot interactive phasors?

Thanks

Hello

 

I am having issue in finding the explanation on how to solve inverse trig funtion and expression with inverse trig funtions. I do not understand my school book and I was hoping that the software would have given me an extra help in understanding my school problems. 

 

Thank you very much

Regards,

Perla D'andrea

Hello people in mapleprime,

Though I wrote the title as Fundamental theorem of calculus,

what I am considering is just how to continue the chain of codes in calculation.

restart;

#I defined F__0 as

F__0:=x->Int(f(t),t=a..x);

#Then, the difference between a primitive function of f(x), F(x), and F__0 is no more than a constant C, so I write.

bb:=F(x)-F__0(x)=C;

#Then, substituting "a" into equation "bb", I obtain the value of F(a)

bb1:=subs(x=a,bb):cc:=simplify(%);

#Then, I substituted the value of C in "bb1" into "bb,"  obtaining the following "cc1."

cc1:=subs(isolate(cc,C),bb);

#And, then, I isolated the term of Int(f(t),t=a..x)  in cc1,

dd:=isolate(cc1,Int(f(t), t = a .. x));

#And, then, I substitute x=b into the outcome of dd, and obtain the final equation.

subs(x=b,dd);

 

Surely, with the above code, I could get the fundamental theorem. But, it looks in a little roundabout way.

So, I thought I would ask here about whether there aren't any better ways to do the fundamentally the same thing or

hints to improve the above code.

Please teach me about this.

 

Thanks in advance.

 

taro

hi every one
please help me for this problem
f

How do I turn off Worksheet mode in a Maple Document.  I copied a calculation from a Worksheet into my Document, now I have to do calculation in 1-D math. 

Any advice would be helpful. 

First 45 46 47 48 49 50 51 Page 47 of 54