As described in the title, my data file looks like this (but is subject to change). The spaces are set to tabs in the original text file
0.79 14035.9514242 2105.39271363
1.235 62934.4320192 9440.16480289
1.24 60046.585558 9006.98783371
1.662 108817.803817 16322.6705726
2.159 93968.3013455 14095.2452018
2.16 103034.193554 15455.1290331
3.6 48481.88 154.7502
4.5 26709.49 107.7075
5.8 19716.24...
User Profile
Collapse
-
Gnuplot setting titles/labels from input
-
Residual Sum of Squares routine, NumPy, SciPy, etc.
I have a function produced by a model, lets call it f(x). I want to compare data that I have observed, (x0,y1), (x1,y1), etc. with an associated error of del(y0), del(y1), etc.
So I have the solution, I just want to figure out the residual sum of squares with a weight factor attached to it.
I was wondering if there was a routine that would allow me to use the parameters that I have above that would produce a residual sum... -
I am getting a
Type Error: 'int' object is not subscriptable
Let me see if I get the jist of how the for loop works...
It's going to scan the file line by line,
For each line it will split it into however elements it contains.
I don't really understand the append line part of the program, from what I understand, it inserts the first two parts segments of the string in the first dimension of the array,...Leave a comment:
-
Okay, so the data I am dealing with looks like a set of thousands of what is below:
USB270.15385-29.63146 270.153847 -29.631455 2.966699e+03 -9.99 1.300391e+03 -9.99 -9.99 A-A-- 6.787463e+01 -9.99 1.555773e+02 -9.99 -9.99 10100 | ----- ------ ------ ------ | 0.373 13.554 12.928 12.670 AAA | ----- -------- - -------- - -------- - -------- - | --- ---------- - ---------- - --------- - --------- - --------- - ---------- -
...Leave a comment:
-
Reading a line from text, and separating it into variables/ Structure
So i recently was forced to switch from C to python for Numerical Analysis reasons, and being new to Python/NumPy I was wondering if there was any equivalent of the function fscanf for Python.NumPy or how I would go about reading in a line of data and store the individual "strings" into variables.
I figured my best bet was probably splitting the string into x pieces using split(), but I'm not entirely sure how to assign... -
-
...Code:#include "stdafx.h" #include<conio.h> #include<string.h> #include <stdlib.h> struct StarInfo { char name [25]; char RA[13]; char Dec[13]; char irac1[13]; char irac2[13]; char irac3[13]; char irac4[13]; char mips[13]; char qual[6]; char Erirac1[13]; char Erirac2[13]; char Erirac3[13]; char Erirac4[13];Leave a comment:
-
In that case, how would I format it to take in the data for the first consecutive 5 strings and insert them into strings a to e?Leave a comment:
-
formatting fscanf
I am trying to use fscanf to obtain a set of 14 or so strings per line, in a line where there are around 80 or so different sets of strings. I only need the first 14 and whenever I call scan f it starts at column 209 as opposed to column 1 where it should. Here's a sample of the code:
FILE *d;
d=fopen("t.dat" ,"rb");
where a, n are all strings.
fscanf(d,"%s %s %s %s %s %s...
No activity results to display
Show More
Leave a comment: