John suggested using the above to help in debugging. Here is my understanding--feel free to correct mistakes.
Question 1:
The manual says "Use avStartWatch
for arrays that are not dynamically allocated. Calling avStartWatch
results in more memory being used than with avAlloc,
since the array data needs to be copied to shared memory."
Q 1.A
Does the above statement mean
avStartWatch does not work with dynamically allocated arrays, even when the array size doesn't change after the initial allocation
or
For optimizing memory, use avStartWatch (avAlloc) for static (dynamic) arrays.
Q 1.B
I use dynamic arrays, whose size is determined at the start of the execution but doesn't change later.
Use of avAlloc seems to require (I am not changing code to use array_av rather than array_c.)
- the creation of an array (array_av)
- copy contents of array_c (array created in C) to array_av
- plot graph
- repeat copying every time array_c changes
Does the graph dynamically update when the contents of array_av change?
Question 2:
Create plot with avCreateGraph2D. array x, array y and the plot cannot be viewed simulataneously.
How does one display simulataneously arrays x, y and the plot in the same window?