ok ... also solved ;-) declarde the s1,... as float ... Thanks anyway :-)
Type: Posts; User: sdherzo
ok ... also solved ;-) declarde the s1,... as float ... Thanks anyway :-)
on the other hand if i perform ( s[1].s1 * DataVal0) & give the answer out as %ld i get the correct answer out of the multiplication ... so why doesnt ( s[1].s1 - DataVal0) work ... :(
struct Sensor
{
int nr,n;
float d;
double s1,s2,s3,s4,a;
};
...
i think the problem is that DataVal is declared as static unsigned long & s[i].s1 as double . i broke up the formula & tried ( s[1].s1 - DataVal0) & ( s[23].s1 - DataVal0) i am just getting...
does not seem to be the problem :-(
hm ... whwn i am printing sys_[][] before the func i get the right answer , so i think i know where the prob was ... thbaks ;-)
I do have another problem now tho ... i wated to calculate s[i...
hi !
I am having a (probably ) simple problem which i am not able to solve :(
For an interpolation function i have to fill my matrix A & B . I have declared them & then tried to allot them...
no i did it now :-)
thank u guys !
ii counted 23 chars in my tablke above ... i rear that it has to be char+1 ... hence 24 ...
wpuld be very thankful if someone suggested the code !
while(fgets(string,24,fp) != NULL);
(
sscanf(fp, "%d %d %d %d %d %d ", &(s[1].nr), &(s[1].d), &(s[1].s1), &(s[1].s2), &(s[1].s3), &(s[1].s4)));
}
hm ... i am still doin sometin...
both together ?
i think the prog is not able to understand the blank space between two numbers. maybe i schould something else and not fscanf
basically it is possible to store the input into structures like how i hav e tried it ?
wow thatks ...;-) i actually have written this myself :-)
- i have used "i" as i wanted each line of the text data to be saved under a variable number "i" & i use it further down in my code for...
The warnings i am getting now are at some other part of the code. They shouldt afft this part,. The prog worked fine befor i put this new part in , despite of the warnings
hm ... i cheanged the %d to %f but still no change... get lesser warnings but it still compiles . But still get the runtime error
hi ,
i have a text file in the following type:
1 1 2516 2517 2517 2508
2 1 2516 2517 2517 2508
3 1 2516 2517 2517 2508
4 1 2516 2516 2516 2508
I want to read it out into my prog to...
i am not a professional programmer like you guys are. I just need it for this private project of mine.
I was hoping for help :-) so pls help if u could ;-)
hi!
i wanted to do some more numerical steps. I have got the induvidual functions but am struggling
to piece them together, basically because my c structure & syntax knowledge isnt so good ...
...
Ya i understand now ! i will try & get back !
Have a nice evening !
hm ... i havent explained it well enough. The distance calculated is not the distance "d" in the table. for every set of reading there is
a calulated distance a(i) ... now i needed the smallest 5 ...
hi!
I am having trouble with this private project of mine. I am not much of a programmer, so i am stuck now with my equations but am not
able to complete my code... would be greatful for help!I...
tried it , found only stuff in fortran ... but scrollin down helps ....
this one seems good : http://www.gilsinan.com/thesis/gaussian.c
Thanks !
no it isn't homework. A private project ... With loads of sensors ... I am getting values from 4 sensors now & want to try to get back to the distance thro that.
After a lot of math ... i have to...