[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DDD 2d-array
From: |
Håvard Huru Bergene |
Subject: |
DDD 2d-array |
Date: |
Mon, 30 Aug 2004 15:27:45 +0200 (CEST) |
I have problems displaying/plotting 2d arrays allocated runtime.
I've tried plotting something like this: (A[0] @ 10)[0] @ 10
It works for double A[10][10;
But not for
double **A;
A=new double*[10];
A[0]=new double[10*10];
for(int i=1; i<10; i++) A[i]=A[i-1]+10;
-huru
An answer to this old question I found should be enough:
From: Paul Carlisle
Subject: Coercing 2D display of 1D data
Date: Fri, 13 Oct 2000 18:50:58 -0400
I've just started using DDD, and I'm wondering: is there a way to get
the Display and Plot commands to treat a 1D, dynamically allocated array
as a 2D array? That is, if I've declared an (implicit) 10 by 10 integer
array by doing:
int* myArray = new int[100];
how do I get DDD to do a 2 dimensional plot of it's contents?
Thanks,
Paul Carlisle
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- DDD 2d-array,
Håvard Huru Bergene <=