NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: lookang on March 30, 2009, 02:58:11 pm



Title: how to view the data values assigned into a array that is [5]*[5] for example.
Post by: lookang on March 30, 2009, 02:58:11 pm
how to view the data values assigned into a array that is [5]*[5] for example.

how to view the data values assigned into a array that is [5]*[5] for example.

i managed to view array data say d2[3]
by using Field and insert variables d2['0'] d2[1] d2[2] d2[3]

is the way to view a array [5]*[5]

also using Field insert variables d3[0,0] d3[0,1].... and so on?
seems very labor intensive, any suggestions?

TableData seems promising but it is the best way to view values stored in d3[5]*[5] for example?

Thanks!


Title: Re: how to view the data values assigned into a array that is [5]*[5] for example.
Post by: Fu-Kwun Hwang on March 30, 2009, 05:54:58 pm
Do you need to know the values for all 2D arrays?
In this case, you might need to print it out as a table or show it in a table.

Do you just want to know how it changes?
In this case, you can use scaleField in 2D or surfacePlot ...etc.

It depends on what is the purpose you want.
Using "loop" might reduce a lot of so called labor intensive work.