Questions tagged [data-files]

209 questions
-1
votes
1 answer

Python - Plot data from a file

I have a large file with data stored in columns like that: Pression Volume Temperature 2 3 6 4 2 8 5 3 15 I would like to plot together the values from different columns to compare them with the values from an other given column. For example, the…
Julien
  • 763
  • 8
  • 32
-1
votes
2 answers

Python3 how to combine 2 text files line by line conditionally

I have two ascii tables in text files containing information about stars, one of which with the headers | ID | TIME | MAGNITUDE | ERROR | and the other has the headers | ID | CLASS | and I want to add the CLASS column to the first text file. The…
-1
votes
1 answer

Cannot print out the array of double numbers after mergesort

Please help, keeps getting these errors. main.cpp: In function ‘int main()’: main.cpp:177:25: error: cannot convert ‘int*’ to ‘double*’ for argument ‘1’ to ‘void printArray(double*, double)’ printArray(arr, arr_size); main.cpp:179:31: error:…
maya
  • 1
-1
votes
1 answer

Generate data file at install time

My python package depends on a static data file which is automatically generated from a smaller seed file using a function that is part of the package. It makes sense to me to do this generation at the time of running setup.py install, is there a…
Anaphory
  • 6,045
  • 4
  • 37
  • 68
-1
votes
1 answer

Surface Plotting on Python 2.7 with pyplot

I am new to Python. I have been trying to plot a data file that contains 3 columns and 1024 data points. While running the code the following error arises: Traceback (most recent call last): File "plot-data.py", line 27, in
Galilean
  • 246
  • 4
  • 15
-1
votes
1 answer

Java scanner class storing multiple int values from datafile into an array

I am trying to create the below method to read the "studentmarks.txt" file. However, I cannot get students marks to be read as an int such as 65 60 52 and stored into an Array. It keeps outputing the error "java.util.InputMismatchException null".…
-2
votes
1 answer

different schemas with different tables refer to identical data file

We have ONE DB which has TWO schemas as follows: Do the Names from both Customer tables refer to the same data file location? If not, is it possible to set them into the same point so in case of changing one the other is changed as well?
sws
  • 39
  • 1
  • 6
-2
votes
1 answer

How to read one line at a time from a data file and to perform calculations in it before moving to the next line in C Programming?

I'm a beginner at C programming and I would appreciate some help in order to understand the problem. Alright so, I have a data file (input.dat) with data like this: (first line) 0 2 3 4 5; (second line) 1 2 3 5 4, (third line and so on...). I'm…
James
  • 11
-2
votes
2 answers

How can I open an existing file in Xcode in C?

I have created a file called mahmoud.txt in the direceotry: /Users/mahmoudhamra/Desktop/C language/ I want to open it in Xcode. I created the directory and the name of the file into a string each. Then I concatenated the file name to the directory…
RedDoumham
  • 51
  • 7
-2
votes
1 answer

How could I get the selected data in the specific rows and columns from data files in MATLAB?

I need your help. I have one data file like below, frames.trr frame 0:00 natoms= 1000 step= 0 time=0.0000000e+00 lambda= 0 box (3x3): box[ 0]={ 1.72E+01 0.00E+00 0.00000e+00} …
S.Baek
  • 1
  • 1
-2
votes
1 answer

Data not saved in binary form

I made a program as below #include #include #include #include void main() { char name[24]; cout << "enter string :"; gets(name); ofstream fout; …
Atheerth
  • 5
  • 5
-3
votes
1 answer

C and C++ : data file with error "Expected unqualified-id"

I would like to run C code in C++, using Xcode 8.33 on MacOS Sierra 10.12. I am new to C/C++, compilers, etc so please bear with me. The C code, when compiled and ran with make via Terminal, works. But when I throw all the same files into a XCode…
tamtam
  • 641
  • 9
  • 24
-3
votes
2 answers

How can I import data from this .dat file

I have data in a file that looks like this: As you can see the data is very neat, but it is not separated in a concise fashion, but rather a variable number of spaces between columns and some columns left blank. This makes it import incorrectly…
user2132672
  • 67
  • 2
  • 9
-7
votes
1 answer

Data File Handling - find count of word in file

I have this Homework question: Write a function in C++ to count the presence of a word 'do' in a text file. What I have tried: I tried to first search the word 'd' in the text file, then search for 'o' if present just after it. #include…
Pushkar Soni
  • 141
  • 8
1 2 3
13
14