Hi guys this is my first post on the BB. I'm a noob in C programming and need some help with fopen. I'm trying to read in 4 lines of textfile data seperated by tabs
and then for each row create a 1D arrayCode:-5.736 -4.936 -4.136 -3.336 -2.536 -1.736 -0.936 -0.268 2.6 2.2 1.8 1.4 1 0.6 0.2 0 0 2.6 2.2 1.8 1.4 1 0.6 0.2 -439.1 -4.08 -4.08 -4.08 -4.08 -4.08 -4.08 -2.04
notice on the B vector a zero in front. How would I write this code using fopen? If anyone could give me some tips on how to code fopen stuff it would be greatly appreciated.Code:Matrix1={-5.736, -4.936, -4.136, -3.336, -2.536, -1.736, -0.936, -0.268}; Matrix2={2.6, 2.2, 1.8, 1.4, 1, 0.6, 0.2 , 0}; Matrix3={0 , 2.6, 2.2, 1.8, 1.4, 1, 0.6 , 0.2}; B={0, -439.1, -4.08 , -4.08, -4.08, -4.08, -4.08, -4.08, -2.04};



LinkBack URL
About LinkBacks



