120 Reputation

5 Badges

12 years, 110 days

MaplePrimes Activity

These are replies submitted by farazhedayati

@Rouben Rostamian  


Thanks again Rouben. 

The last couple lines, the value of C_2 varies with each input. in your code:

c_2(my_x, my_xbar,1) is 0.00069

c_2(my_x, my_xbar,9) is 0.00076

c_2(my_x, my_xbar,17) is 0.0007


I am looking the sum of these numbers from 1 to length of my input


Thanks a lot for helping me 


@Rouben Rostamian  


Thanks Rouben. Please consider Xbar and x[i] as independent variables. like x and y.

Xbar is obtained from a different series of measurments.

My question boils down to:

How can I subtitute x in c1 and c2.




English is my second language and Im learning it. I thought its clear! you can simply say you dont want to/cant/... help. These are some lines from a larger code and some of these "crap" will be used later.

Anyways thank you for your time :)



I dont know where is the problem when I change your code. I have attached the modification. I simply multiply the integral by a function but cannot get the results.

Really appreciate your time



@Markiyan Hirnyk 


Thanks man. you saved me.

@Preben Alsholm 

I ran the code for different functions and plotted the contour plots. Coppied and pasted in a new worksheet and then the next function and the next contour plots. 

Doing this for years and first time facing this issue. Very disappointed Maple! Very! 


Thank you for your time tho. Appreciate the time you put to help me. 

@Carl Love 


many thanks for your attention Carl 


I dont know why it doesnt work for me! here is my function



I simply copied and pasted the procedure to a maple sheet and substitute x^2+y^2 with PP! Is it a wrong way? help me please

Thanks for your attention 




Thats why I love phoroshop! lol 

Thanks any way :) 

@Doug Meade 


Awesome. Problem solved. 
Thanks a lot :) 



Thanks for your reply. Im taking the 3d graph. change rho and see what happens to the 3d graph. Maybe the coefficient of (x-constant)*(a-constant) gets large ( in the exponential) abd maple fails to plot. I have attached two pictures to show what I mean.


when rho increases, maple plots several pics! 

thank you



Thanks for your great help.


How can I change the colors? 

The colors appear are not different enough, it may be confusing. I need more distinct colors. I changed c1 to

c1:=[Color("#123456")[]]: still in a same color family. I am seeking for more obvious change in colors,


thanks again




Thanks Chris for your attention. 

I cant get the results. I would be grateful if you help me to know what is the problem. I despretly need some help from a pro. I have uploaded the file.





rho := -.1069;



Meanx := 338.8235*.3048;



Meana := 3.8235*6.4516;



stda := 3.9857*6.4516;



stdx := 107.3832*.3048;



z := (x-Meanx)^2/stdx^2-2*rho*(x-Meanx)*(y-Meana)/(stdx*stda)+(y-Meana)^2/stda^2;



PP := exp(-z/(2*(-rho^2+1)))/((2*3.1415)*stda*stdx*sqrt(-rho^2+1));




evalf(int(int(PP, y = 0 .. infinity), x = 0 .. infinity));



PPP := PP/%;




plot3d(PPP, x = 0 .. 200, y = 0 .. 110, labels=["x(m)","a(cm^2)","PDF(x,a)"]);


ContoursWithLabels := proc (Expr, Range1::(range(realcons)), Range2::(range(realcons)), Number::posint := 8, S::(set(realcons)) := {}, GraphicOptions::list := [color = black, axes = box], Coloring::`=` := NULL) local r1, r2, L, f, L1, h, S1, P, P1, r, M, C, T, p, p1, m, n, A, B, E; f := unapply(Expr, x, y); if S = {} then r1 := rand(convert(Range1, float)); r2 := rand(convert(Range2, float)); L := [seq([r1(), r2()], i = 1 .. 205)]; L1 := convert(sort(select(proc (a) options operator, arrow; type(a, realcons) end proc, [seq(f(op(t)), t = L)]), proc (a, b) options operator, arrow; is(abs(a) < abs(b)) end proc), set); h := (L1[-6]-L1[1])/Number; S1 := [seq(L1[1]+(1/2)*h+h*(n-1), n = 1 .. Number)] else S1 := convert(S, list) end if; print(Contours = evalf[2](S1)); r := proc (k) options operator, arrow; rand(20 .. k-20) end proc; M := []; T := []; for C in S1 do P := plots:-implicitplot(Expr = C, x = Range1, y = Range2, op(GraphicOptions), gridrefine = 3); P1 := [plottools:-getdata(P)]; for p in P1 do p1 := convert(p[3], listlist); n := nops(p1); if n < 500 then m := `if`(40 < n, (r(n))(), round((1/2)*n)); M := `if`(40 < n, [op(M), p1[1 .. m-11], p1[m+11 .. n]], [op(M), p1]); T := [op(T), [op(p1[m]), evalf[2](C)]] else if 500 <= n then h := floor((1/2)*n); m := (r(h))(); M := [op(M), p1[1 .. m-11], p1[m+11 .. m+h-11], p1[m+h+11 .. n]]; T := [op(T), [op(p1[m]), evalf[2](C)], [op(p1[m+h]), evalf[2](C)]] end if end if end do end do; A := plot(M, op(GraphicOptions)); B := plots:-textplot(T); if Coloring = NULL then E := NULL else E := ([plots:-densityplot])(Expr, x = Range1, y = Range2, op(rhs(Coloring))) end if; plots:-display(E, A, B) end proc:


ContoursWithLabels(PPP, -1 .. 200, -1 .. 110, thickness = 3)

Error, (in ContoursWithLabels) invalid input: rand expects its 1st argument, r, to be of type {posint, integer .. integer}, but received -1. .. 200.






Download heartview_-_Copy.mw

@Carl Love 

Thanks again and again ...




B := 1+(2*(1-zzeta))*Br*(int(tau*(diff(u(tau), tau))^2, tau = (1/2)*zzeta*(1-zzeta) .. 1/2*(1-zzeta)));
eq4 := 4*B*u(tau)-(1+zzeta)*(diff(tau*(diff(theta(tau), tau)), tau))/tau-(1+zzeta)*Br*(diff(u(tau), tau))^2;

HH:= p*((4*(1+(2*(1-zzeta))*Br*(int(tau*(diff(u(tau), tau))^2, tau = (1/2)*zzeta*(1-zzeta) .. 1/2-(1/2)*zzeta))))*u(tau)-(1+zzeta)*(diff(theta(tau), tau)+tau*(diff(theta(tau), tau, tau)))/tau-(1+zzeta)*Br*(diff(u(tau), tau))^2)+(1-p)*(diff(theta(tau),tau$2)):

convert(series(collect(expand(eq5), p), p, nn+1), 'polynom');

for ii to nn do
ss[ii] := (coeff(eq7, p^ii)) ;
print (ii);
end do;

ss[0]:=diff(theta[0](tau), tau, tau);

icss[0]:=theta[0](0)=0, D(theta[0])(1)=1;

dsolve({ss[0], icss[0]});
theta[0](tau):= rhs(%);

for ii to nn do
icss[ii]:=theta[ii](0)=0, D(theta[ii])(1)=0;
dsolve({ss[ii], icss[ii]});
end do;

> plot(, tau = .1 .. 1);

1 2 Page 1 of 2