5 Reputation

One Badge

1 years, 139 days

MaplePrimes Activity

These are replies submitted by Aguiar

@acer ,

I found that Worksheet works correctly, whereas Document does not, as you mentioned.
In fact, the solution you gave me was even more convenient.
However, when I use:

restart:                                                                  # Restart
with(Threads):                                                      # To use Sleep()
a := 2*((ceil(rand()/10^10)-50)*(1/10)):                # Random Value
b := 2*(ceil(rand()/10^10)-50):                             # Random Value
c := 2*ceil(rand()/10^10)-100:                             # Random Value
f := proc (x) options operator, arrow; a*x^2+b*x+c end proc;                  # Generic function that i'm ploting.
np := 10:                                                              # Number of Points i'm ploting
vmax := 10:                                                         # Maximum funcxtion value
VAR1 := Matrix(np+1, 2, proc (m, n) options operator, arrow; if n = 1 then (m-1)*vmax/np else 0 end if end proc):       # Declaring VAR1 as a "null" matrix

for i to np+1 do                                                  # Loop Start
VAR1[i, 2] := f((i-1)*vmax/np):                           # VAR1 value update
print(DocumentTools:-SetProperty("Plot0", value, plot([VAR1], x = 0 .. vmax, gridlines)))                           # Ploting VAR1
Sleep(.25):                                                         # Simulating longer processing time

the output returns blanks before the graph.
As the total number of iterations (np) increases, the greater the number of blanks, suggesting one space for each iteration (i).
is it possible to remove these blanks?

Thank you again.


Page 1 of 1