On Fri, Dec 16, 2011 at 1:06 AM, StudentinCrisis
<address@hidden> wrote:
I'm supposed to create an array that uploads a .dat file. For example
numbers.dat has the following content:
6
0.5
2
3 3 5
1 1 4
6 is the width, 0.5 is the initial case and 2 is the number of sources, 3 3
5 indicates 3rd row and 3rd column should be filled with 5 and 11 4
indicates 1st row 1st column should be filled with 4
So for example (ignore the brackets):
[4.0000 0.5000 0.5000 0.5000 0.5000 0.5000]
[0.5000 0.5000 0.5000 0.5000 0.5000 0.5000]
[0.5000 0.5000 5.0000 0.5000 0.5000 0.5000]
[0.5000 0.5000 0.5000 0.5000 0.5000 0.5000]
[0.5000 0.5000 0.5000 0.5000 0.5000 0.5000]
[0.5000 0.5000 0.5000 0.5000 0.5000 0.5000]
I need to something to work with, I'm supposed to use this function:
function out = initGroup(grid, source1, source2, source3, source4). Any
ideas? I need some kind of direction.
You could do something like the attached file (I just chose the number of rows to be equal to the number of columns).
Hope this helps.