ComputerUser

535 Reputation

10 Badges

11 years, 338 days

Social Networks and Content at Maplesoft.com

Seldom to ask question after retired math hobby Just waiting for beauty who born in 1994 And waited for her email to mavio@protonmail.com What is the difference in ownership among different universe?

MaplePrimes Activity


These are questions asked by ComputerUser

How to pdsolve(diff( f(a,b), a+b) = diff( f(a,b),a))?

buy := proc(ss,windowlength,syseq1,syseq2a,syseq2b)
try:
p := dualaxisplot(listplot(ma, color = red), listplot(me, color = blue), style = line, gridlines = false);
catch:
p := dualaxisplot(listplot(me, color = red), listplot(me, color = blue), style = line, gridlines = false);
end try:
return p:
end proc:


CheckGraph := proc(text,graphparam1,graphparam2)
  local maplet, choice:
  maplet := Maplet(
    [
      [Plotter['PL1'](graphparam1)],
      [Plotter['PL2'](graphparam2)],
      #[Plotter['PL2'](graphparam2)],
      [text, ComboBox['CoB1']("No Refund", sort(["Jackpot"], lexorder))],
      [Button("OK", Shutdown(['CoB1'])), Button("Cancel", Shutdown())]
    ],
  ):
  choice := Maplets[Display](maplet):
end proc:

graph1 := buy(0,100,rhs(sol[parse(result1[1])][1]),rhs(sol[1][1]),rhs(sol[2][1]));

>graph1
can show graph but after using Plotter['PL1'] , it can not show graph in dialog

CheckGraph("Has Jackpot?",graph1,graph2):

 

how to plot dualaxisplot in dialog?

would like to show a list system one by one and ask question and wait for answer and then plot graph and ask question and wait for answer and then show next system ask question and contiune this for loop

but my script show all system at once but can not one by one and no pop up dialog and no wait for answer

how to do?

 

restart:
interface(prettyprint=2):
with(ListTools):
with(StringTools):
with(ExcelTools):
with(SumTools):
with(Maplets[Elements]):
count := 1:

RR := Import("C:\\Users\\ohungyeeel\\Documents\\EquationsLists.xls", "Candidate", "A1:Q65535"):

for mm from 2 to 20 do

try:
if RR[count,13] = "Complex" or RR[count,13] = "Beautiful system but no result" then
dummy := 0:
else
print(RR[count,1],RR[count,2]):
sol := solve(RR[count,2]):
print("Source:",RR[count,3]):
print("Solution:",sol):

choosesystem := Maplet(InputDialog['ID1']("Choose system?", 'Yes1' = Shutdown(['Yes']), 'No1' = Shutdown(['No']))):
Maplets[Display](maplet):

if choosesystem = "Yes" then
RR[count,15] := "SystemChosenAndSolutionCorrect":
else
RR[count,15] := "NotChosenAndSolutionWrong":
end if:

plot(sol):

choosesystem := Maplet(InputDialog['ID1']("Like and it works?", 'Yes1' = Shutdown(['Yes']), 'No1' = Shutdown(['No']))):
Maplets[Display](maplet):

if choosesystem = "Yes" then
RR[count,16] := "Best":
else
RR[count,16] := "NotSelected":
end if:

end if:

catch:
print("error at ",RR[count,1],RR[count,2]):
end try:

count := count + 1:
od:
Export(RR, "C:\\Users\\ohungyeeel\\Documents\\EquationsLists10092020.xls", "Candidate", "A1"):

interface(prettyprint=2):
with(ListTools):
with(StringTools):
for xx from 1 to 2 do
xx := 1:
Source := FileTools[Text][ReadFile](cat("C:\\hello\\probability1-200-26042020\\home\\probability",xx,"\\probability",xx,".txt")):
openindex := [SearchAll("[",Source)]:
endindex := [SearchAll("]",Source)]:
beforefiltered := []:
for mm from 1 to nops(openindex) do
if mm > 27 then
beforefiltered := [op(beforefiltered), Chop(substring(Source, openindex[mm]..endindex[mm]))]:
end if:
od:
afterfiltered := []:
for mm in beforefiltered do
if Has(mm,"--") or Has(mm,"|") or Has(mm,"{") or Has(mm,"}") then
dummy := 0:
elif Has(mm,"Root") then
dummy := 0:
else
afterfiltered := [op(afterfiltered),mm]:
end if:
od:
afterfiltered[1];

however after chop still has new line, can not make a beautiful csv format, 

"[b(t,k)+ a
(t,k)*
x(t,k)]"

# I try to export to text first and then use Excel to use "|" as delimiter instead comma as delimiter,
#because b(t,k) has comma "," will separate to open a new column

appendto("C:\\Users\\Student\\Documents\\IQ1-200csv.txt"):
for mm in afterfiltered do
AA := parse(mm):
lprint(xx,"|","hello := [","|",AA[1],"|",AA[2],"|","]:");
od:
od:

Expect csv in format
1,b(t,k)+a(t,k)*x(t,k)
2,a(t,k)+s(t,k)*z(t,k)

There are 3 lists of data 

how to plot 3 lines with x axis represent time 1,2,3...

 

1 2 3 4 5 6 7 Last Page 3 of 141