Hi, a section of my code is as follows:
insert
for (i = 0; i < N; i++){
result[0] = distance(myPoints[i], myPoints[(i+1)%N]);
Type: Posts; User: zesty
Hi, a section of my code is as follows:
insert
for (i = 0; i < N; i++){
result[0] = distance(myPoints[i], myPoints[(i+1)%N]);
the first bit of my code is as follows so far:
insert
struct point{
double x;
double y;
};
typedef struct point point;
and the number of points that I am dealing with will be of the order of N= 1000 say, so not very large,,
thanks everyone for all your help! sorry it has taken me so long to reply..
at the moment, i am simply looking for a computation of the order of N^2 where N is the number of points labelled...
hi,
my problem is as follows:
I have a list of N pairs of coordinates labelled (x[i],y[i]) i=1,...,N.
What I want to do is to take every point (x[i],y[i]) and find the Pythagorean distance...
yeh i managed to do that, and it works so WOOHOO!:>..tho i used the ceiling function which worked out alrite..thankyou so much for all ur help:)..xx
yeh, it was a while loop that looks like
time_increment=0.5;
time[0]=0;
A=1;
w2= k/m;
w= pow( w2, 0.5);
p= (10*M_PI)/w;
but how would i go about doing that..it seems like a contradiction:S...my malloc looks like this
FILE *output;
float m, k, g, *x, *v, time_increment,*time, w2, w, p, *f, A, omega;
int...
ok then...so i declare float *x..Then do i have to do anything with it like x=&x[0]; or *x=x[0] to get it to take it as the start of my array, or am i talking rubbish..And when would i have to use...
thanx. And i was also wondering in my programme i use 4 arrays all of which i dont know the size..However, only two arrays are actually output to an external file.So would i need to use malloc on all...
but i dont understand what i would write in the *fArray bit for my time array?
Hi..I need some help in using the realloc function in my program as the memory i need to use keeps on changing based on some parameters.Do i first have to use the malloc function and then realloc?
...
heyy, thanx for the replies but i wanted to write it into my program a short piece of code that would calculate the number of lines in my output file, which varies all the time, say 'n' to then...
hey guys,
im trying to use malloc and realloc in my programme, as the sizes of my arrays change with some parameters in my program.But to use them i need to calculate the number of lines that I...
hey guys..i need some help on understanding how to use malloc and then realloc in my programme..the sizes of my arrays are always varying based on some parameters that i have in my program, so i know...
ok, so basically heres my problem...in my program i have to write to my output file column of time, against x(t)..so i have to output time[i] and x[i], where
time[0]=0 and x[0] is given by reader...