MaplePrimes Questions

sin(Pi*1.0) returns -4.102067616*10^(-10). How do i make it return exact zero?

I am modeling a molecule.  I have six line segments.  I know the coordinates of their ends as functions of time.  Naively, I would think it would go like this:

define some functions (composites of trig functions, rational functions, etc)

define points 1,2, ..., 6.   (in terms of the functions)

define line1, line2, ...., line6

define structure = union of 6 lines

animate(structure) as t goes from t_0, ..., t_1

How exactly do i do this?

Hello everybody,

I am new on this forum, and please to join your community.
As part of a project related to Origami, I try to follow the paper entitled "Mathematical Approach to Model Foldable Conical Structures Using Conformal Mapping", in order to flat-fold a conical structure.

As described in the paper a non-linear system need to be solved in order to get a corrected angle beta... The paper advize the use of "fsolve" function in Matlab, but I did not manage to do it... So I tried with Maple, but I get an error using NLPSolve, and I do not understand why...

Here is the edited, withdrawn and finally back file : Angle.mw

Do not hesitate to ask for any other explanations.

Any help is going to be appreciated.

Cheers,

Hi every body:

I have a problem with below function (f(x)), I will calculate values this function with for loop so that values are closer together. for example I will earn 10 or 20 data for this function so that they differences have to be fixed.my means is that I have 10 data like, 50,65,85,90,100,... no 50,100,170,... . that isn't important for me the data increase with constant value but my final data must be closer together. (the maximum number of my data to be taken is 50). 

function is:

f:=(x)->(310*(z+0.5)^0.2)+70

z=[-0.5,0.5]

 

with regards...

Mehran.

Can the font in the Maple Component Text Area be changed? It's not obvious how to do it from "Component Properties" or anywhere else. 

Thanks, Greg.

Maple 18 and MapleNet 2015.

Show/Hide Contents allows one to hide certain elements of the worksheet. Is there a way settings there (or somewhere) can be locked so that another user is prevented from seeing certain elements of the worksheet?

Rationale: As an example: I'd like my students to use Maple Player to interact with a worksheet, using Maple Component GUI elemnts. I do not want them to see all the code behind that, and in fact explicitly want to rule them seeing some function definitions. I can hide "input, output" when I create the document, but under "View" in Maple Player, the intrepid student could always unhide that and see the code.

I'm using Maple Player 2105, Maple 18 and exploring using Maple/MapleNet/MaplePlayer for education. 

Is the following correct? In order for a my students to access a Maplet, they would need a full version of Maple installed on their system (Maple Player would not be enough) I couldnt get Maplets to work with Maple Player, but maybe that's just me.

(I do not have the $ at the moment to go the MapleNet route)

Thanks for your help,

 

Greg 

Hi all,

 

I want to create a (set of) samples from an own distribution. The distribution itself is a normal distribution, but with some 'gaps', as shown below:

plot(exp(-(t-10)^2/(2*(0.5e-1*10)^2))*piecewise(t<9,0,t<9.9,1, t<10.1,0, t<11,1), t = 8.5 .. 11.5)

(It is supposed to represent the distribution of discrete resistor values (e.g. 10 ohms), where not only the values above the tolerance (e.g. 10%) are removed, but also those who can be sold as higher precision resistors (eg. 1%). The mean, lower tolerance and higher tolerance should be variables).

Because of the fact that in order to be able to use the Sample function, the PDF should be twice differentiable, the 'truncation' in the middle is realised using logistic functions.

I am able to create said distribution, and produce a DensityPlot, but when I try to take a (even a single) Sample from a RandomVariable from that distribution, Maple keeps calculating and no sample is produced.

GetDist := (mu, alpha, beta) -> Distribution(PDF = unapply(LotRPDF(t, mu, alpha, beta), t)):
T := GetDist(10, .1, 0.1e-1);
DensityPlot(T);
RandomR := RandomVariable(T):
Sample(RandomR, 1);

Where LotRPDF is the function depicted above, mu is the mean (10), alpha is the maximum tolerance (10%), , beta is the minimum tolerance (1%)

Am i overlooking something simple? Or is there a more fundamental error in my approach? I've added the maple sheet with more details.

RandomVariableSample.mw

 

hi

I am trying to construct a series of 10X10 matrices whose main diagonal contains exactly k ones and other entries zero.

 

plz suggest thanks

Hi

I am trying to approximate a function in terms of piece-wise constant function:

 

$$f(x) = \sum_0^N c_iB_i(x)$$

 

what modules/packages of maple are helpful here? thanks

how to calculate the shorting routing path in cayley graph?

i search that it is related with knuth bendix


In the following code, the evalf prints -32.16... 

restart; S := 8;

sigma := 8/sqrt(2*Pi);

iprec := 151;

evalf(log[2](-(sum(log(round(2^iprec*exp(-j^2/(2*sigma^2)))/2^iprec*exp(-j^2/(2*sigma^2))))*round(2^iprec*exp(-j^2/(2*sigma^2)))/2^iprec, j = 0 .. 7))));

 

Change the last line to evalf[20](log[2](....)), and re-run *just that line*. It now prints -66.67...

Change the last line to evalf[200](log[2](...)) and re-run *just that line* again. It now prints -151.24... (I have strong evidence to support that the true value is near -151, so I believe this answer.)

Now remove the precision indicator from the command completely and re-run just the last line. It *still* prints -151.24...!

 

My two questions are: why do I need evalf[200] to get the first three digits of the answer to be correct? and why does setting the evalf precision and then removing it cause the previous precision to persist?

hello everyone. I have an undergradute project i'm currently working on and I'm stuck where I have to use the Differential Transforms Method to solve a problem with boundary conditions at infinity


restart;

Digits := 5;

F[0] := 0; F[1] := 0; F[2] := (1/2)*A; T[0] := 1; T[1] := B; M := 2; S := 1;

for k from 0 to 10 do F[k+3] := (2*(sum((r+1)*F[r+1]*(k+1-r)*F[k+1-r], r = 0 .. k))-T[k]-3*(sum((k+1-r)*(k+2-r)*F[r]*F[k+2-r], r = 0 .. k))-M*(k+1)*F[k+1])*factorial(k)/factorial(k+3);

T[k+2] := (-3*(sum((k+1-r)*F[r]*T[k+1-r], r = 0 .. k))-S*T[k])*factorial(k)/factorial(k+2)

end do; f := 0; t := 0;

for k from 0 to 10 do

f := f+F[k]*x^k;

t := t+T[k]*x^k end do;

print(f);
print(t);

but the problem is that i cant seem to evaluate

or higer diagonal pade-approximant. any help will be greatly appreciated. thank you.

Please help, here is my code:

 

findproot:=proc(f,var,k)
local i,g,B,n,L,tk;

readlib(rootbound):readlib(realroot):
B:=rootbound(f,var);
g:=expand(subs(var=B*var,f));
if B<1 then g:=numer(g);fi;
n:=degree(g,var);
L:=zero_one(g,var,n,1/B/2^k);
tk:=k+1:
while has(L,0) do
L:=zero_one(g,var,n,1/B/2^tk);
tk:=tk+1:
od:
if L=[] then RETURN([]);fi;
L:=map(proc(x,y) [op(1,x)*y,op(2,x)*y];end,L,B);
end:

 

I dont know why i cant run this code, it always report: 

Error, (in findproot) improper op or subscript selector

Hello, i am recently doing a lot of my (really simple) equation manipulations with Maple and would like to include an expectation operator E( ) in my symbolic equations. As maple threads E() as a function, differentiating is not very convenient, as i have to replace all D(E) ... manually. I tried defining some properties of E() via the define() function, but when trying to set the behavior of d E(f(x))/dx I am not sure how to use (diff()=result) in the define() function. Any help or ideas are greatly appreciated!

First 1258 1259 1260 1261 1262 1263 1264 Last Page 1260 of 2429