abdulganiy

140 Reputation

6 Badges

7 years, 251 days

MaplePrimes Activity


These are questions asked by abdulganiy

Please I have an issue with the attached plot code. Can you kindly help to correct it? 

restart:
interface(rtablesize=infinity):
B:=<<0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.49,"0","0.05","0.1","0.15","0.2","0.25","0.3","0.35","0.4","0.45","0.49">|
	<14.73,14.4,14,13.4,12.67,11.67,10.4,8.67,6,3,0,"14.73","14.4","14","13.4","12.67","11.67","10.4","8.67","6","3","0">|
     <-0.007072,0.013309,0.033707,0.054125,0.074571,0.095056,0.115597,0.136218,0.156956,0.177867,0.199036,0.22059,0.242719,0.265702,0.289932,0.31592,0.344214,0.375124,0.408175,0.441761,0.473484,0.501857>|
	<1.34E+01,1.33E+01,1.33E+01,1.32E+01,1.31E+01,1.31E+01,1.30E+01,1.29E+01,1.28E+01,1.26E+01,1.25E+01,1.22E+01,1.19E+01,1.14E+01,1.08E+01,9.86E+00,8.58E+00,6.90E+00,4.90E+00,2.81E+00,1.00E+00,-2.86E-01>>:

B:
 
 plot([B[..,[1, 2]],B[1..1,[1, 2]], B[.., [3, 4]],B[1..1,[3, 4]], B[..,[5, 6]],B[1..1,[5, 6]],B[.., [7, 8]],B[1..1,[7, 8]],
 	  B[..,[9, 10]],B[1..1,[9, 10]], B[.., [11, 12]],B[1..1,[11, 12]],B[..,[13, 14]],B[1..1,[13, 14]],B[.., [15, 16]],B[1..1,[15, 16]],
 	  B[..,[17, 18]],B[1..1,[17, 18]], B[.., [19, 20]],B[1..1,[19, 20]],B[..,[21, 22]],B[1..1,[21, 22]]],
 	  legend = ["","Experimental","","Simulation"],
 	  style = ["line","line","line","line","line","line","line","line","line","line","line","line","line","line","line","line",
 	 		"line","line","line","line","line","line"],
 	  color=[blue,red], labels=[`V (V)`, `Jsc (mA/cm^2)`]);
 



Download Graph_Example.mw

In the following code, I want the base of the logarithm in the label to appear at the conventional position not beside the logarithm. How can I achieve this? Thank you all in anticipation of your educative response and do stay safe.

restart;

B:=<<39,76,151,301,601>|<7.71E-8,5.43E-9,3.55E-10,2.11E-11,1.32E-12>|
	<26,51,101,201,401>|<6.46E-3,1.17E-4,1.88E-6,2.96E-8,4.46E-10>|
	<26,51,101,201,401>|<2.74E-4,6.34E-6,1.16E-7,1.85E-9,2.92E-11>|
	<26,51,101,201,401>|<6.48E-4,4.39E-5,2.99E-6,1.88E-7,1.18E-8>>:

for i from 1 to 5 do
   B[i, 2] := log[10](B[i, 2]):		  			
   B[i, 4] := log[10](B[i, 4]): 		
   B[i, 6] := log[10](B[i, 6]): 		
   B[i, 8] := log[10](B[i, 8]):	
       

   
end do:  # computing the log of the max-error
B: # This is the table of values we'll plot.

T:=plot([B[..,[1, 2]],B[1..1,[1, 2]], B[.., [3, 4]],B[1..1,[3, 4]], 
	 B[..,[5, 6]],B[1..1,[5, 6]],B[.., [7, 8]],B[1..1,[7, 8]]], 
	legend = ["","BFFM","", "BHT","", "BHTRKNM", "", "BNM"],
	#title="Efficiency Curve for Example 1",
	style = ["pointline","point","pointline","point","pointline","point","pointline","point"], 
	symbolsize = 15,axes = framed, 
	symbol = [box,box, circle,circle,diamond,diamond,solidcircle, solidcircle],
	color=[red, red, blue,blue, black, black, green, green], 
	axis = [gridlines = [colour = green, majorlines = 1,linestyle = dot]], 
	labels = ["NFE", "log[10](Max Err)"]);

 

I have written the following attached code to use Euler explicit method to solve the following IVP

diff(y(x), x) = 2*(1+x)-y(x), y(2) = 5
With Exact solution  y(x) = 2*x+exp(-x)/exp(-2)

However, I found out that my exact results are not correct while the numerical results are okay. What have I done wrong in the code? Can someone modify the code?

Thank you and kind regards.

Dear all,

Please I want only 8 points to show on this curve, how do I specify it?

plot(ln(1+sin(Pi*x)), x = 0 .. 1, legend = numerical, style = point, symbol = box, color = blue, symbolsize = 15, numpoints = 8);

Thank you all and kind regards.

Please do keep safe amidst this global pandemic.

Dear All.

I hope we are all staying safe.

Please I want to solve Sine Gordon Equation using a numerical method I constructed (non-classical), I need to compare the result of the method with the exact solution to generate the errors. However, since the exact solution has two variables, x, and t, I really don't know how to accommodate the two in my coding.

Can someone be of help in this regard?

Thank you and kind regards

 


Download Discretization_of_Sine_Gordon_Equation.mw

Download Sine_Gordon_Implementation_Trial.mw

 

1 2 3 4 5 6 7 Page 3 of 7