File Definition and 575 Threads

  1. L

    How to copy 2 bytes from a file an put into result variable?

    Hi! I don't know if I am even wording this right but here goes. I have to write a programme to read two data files into C++, then ouput as one file in the same format. The two files are files of 10 bit data. Each 10-bit recorded value is represented by a 16 bit word, of which the top 6...
  2. T

    Troubleshooting Attached File: Solutions Here

    Need help with the file attatched. thanks.
  3. A

    How to divide an wav file into segments

    Does anybody know how to do this in matlab?
  4. A

    Fortran Input .txt file into Fortran program

    I am trying to input a txt file into my fortran program. My txt file is a 9x2 table of integers, all I want is to display the values in the same format in my program. I tried using, program name implicit none integer :: input(9,2), I, J open (unit=20, file="values.txt") DO I =...
  5. J

    Checking Output of File Operations: How to Open & View a Text File

    how to see the output of a file operation? eg void main() { int a; cin>>a; ofstream o("a.txt"); o<<a; o.close(); } does the text file "a" come into existence? can we open it?
  6. D

    Cannot copy/rename file in Eclipse error

    Every time i try and copy or rename a file in Eclipse, I get the error org.tigris.subversion.javahl.ClientException: RA layer request failed svn: Server sent unexpected return value (405 method not allowed) in response to MKACTIVITY request... help!
  7. M

    Can't read parameters from file

    Homework Statement I'm trying to read parameters from a text file (format below) but actually my function didn't receive any parameters from read file function. Number_of_points 80 Distance 10.0 Time_step 0.05 Velocity 5.0 Diff_coeff 50.0 Homework Equations The Attempt at a...
  8. M

    Comp Sci Can't write calculated resulted to file in C++

    Homework Statement Dear physics forum, I'm start learning C++ and I'm trying to program a space transform function for linearized convection-diffusion problem using Code:block Everything was fine until I wrote calculated result into a file. When I run the program, some error message...
  9. A

    Fortran Read start: end of file error in fortran

    Hi all, do i = 1, 79 open(2,file=afiln(i),status='old') do k = 1,11 read(2,'(51a)')astr1 enddo do j=12,2000 read(2,22,end=23,err=23)iyr,imn,id,ih,imt,flx write(7,*)i,j obstim =...
  10. B

    Matlab: changing frequency of a .wav file

    Homework Statement Write a script which plays a Doppler shifted version of a WAV file. The Attempt at a Solution This is the code for a doppler shifted single frequency: vs = 1100; % speed of sound in feet per second v0 = s*22/15; % speed of the vehicle in feet per second fs = 10000; %...
  11. T

    MATLAB Matlab Help -- code to randomly select a file and a sentence in that file

    clc for ii=1:1:3 % start looping rand_id= rand(1,1) *3; % Randomly generte a number between 1 to 3.if (rand_id<1) rand_id=1; % 0 is ommitted. else rand_id=floor(rand_id); end % rand_id will be used to open a previously saved file randomly. if (rand_id==1)...
  12. J

    Brain File Compression: Investigating Memory Recall

    Hi. You may only understand what I am going on about here if you play an instrument. I have often noticed that there are songs that I really love and know inside out, which, in my mind, I can play almost perfectly in my head; most of the parts and certainly all of the melodies etc. But...
  13. D

    MATLAB Writing Strings to File in MATLAB

    Hey, so i want to write a string to a .txt file and I tried by doing this: save filename.txt writer (where writer is the variable containing string) ... But i get weird char. instead of the string. Any ideas?
  14. E

    Searching for a string in a file (C)

    Hi, I've got a program which recalls strings randomly from a file. The file contains the strings, with each one taking up 200 bytes and if it's not long enough, I have spaces inserted after to make up the length. So they are all end to end, and there are no line breaks. The program works...
  15. P

    MATLAB Matlab questions: Read from Excel file

    Hi, Looking for a bit of cheeky help with matlab, I am stumped! 1) I have written a program that i want to cycle through different sets of data, ideally this is what i would like: These are all xls files with columns of data ydata = ... xdata = ... zdata = ... for variable =...
  16. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    I have a short code that calculates the running median for three columns of data in an input file and writes the running medians out to three columns of data in an output file. I use Numerical Recipe subroutines and functions to compute the running median. If I include a WRITE(*,*) directly...
  17. K

    C Program Help: Count & Sort Word Occurrences in File

    C program help! Hey guys I am having trouble completing this C program. Its suppose to ask the user to enter a file to read from, read the file, count how many times each word appears and print the results in a different file(also user input) arranged from high occurrence. Heres what i...
  18. N

    MCNP: SRCTP file with KCODE card

    Hey, I'm modeling the criticality of a core for a university project using MCNP4C. I've run the core on the appropriate KCODE parameters, specifying the source using the KSRC card, and I was looking to cut down on the computing time using the SRCTP files. My problem is that I can't find...
  19. Andy Resnick

    Sharing Lab Photos - What's the File Size Limit?

    I finally got a decent color camera for my lab, and would like to share some images here. I can't find any forum guidelines for the images- specifically, what's the allowed filesize?
  20. James889

    How Can I Replace Hyphens with Spaces When Reading from a File in C?

    Hi, I'm trying to write a simple program that reads the content of a textfile and removes all hyphen by replacing them with ' ' #include <stdio.h> #include <stdlib.h> int main(){ FILE *fp = fopen("Thetextfile.txt","r+") /* Open for reading and writing */ char ch; while(ch =...
  21. M

    Comp Sci Is My C++ CellStatus Function Causing Print Failures After First Generation?

    it prints fine for the first generation, but nothing else after that. i am thinking that my problem lies in the cellStatus function and its implementation within the printCell function. attached are the files that i am getting input from and the file that i am printing to. #include...
  22. D

    Fortran Help with reading file into FORTRAN

    Hey all, I'm in the process of writing a Suggested Reorder Program for my father's small business.. His current computer program exports its item data in the form of .CSV files. I'm trying to read the file into FORTRAN to manipulate. However, I run into the following problem: Even...
  23. V

    C/C++ Eclipse Error 'Program File Does Not Exist'

    I am pretty ignorant of this language. I am working from a '...for dummies' book to teach myself and after the first few pages I have already stumbled upon a problem. I have attached a code, pretty simple one, which I'm trying to run but there are some errors and I don't know how to resolve...
  24. GRB 080319B

    .exe file not a valid Win32 app

    I've tried to open several different .exe files, and keep getting the same error. I've gone to several Windows help/ troubleshooting sites to no avail. My OS is Windows XP SP3 and browser is Firefox Ver. 3.5.9. I'm not able to install any other browsers on my system to test if this is Firefox...
  25. M

    Efficient Text File Trimming in C++: Locating and Removing White Spaces

    i am trying to locate the end of a text file and delete any extra white spaces following it, but i am having trouble trying to do this. is there an easy way to do this? right now i am reading the text in character by character and outputting the text to another outstream file. i can't seem to...
  26. R

    Redirect output of mc6811 from terminal to a file

    Hi, I want to redirect output of mc6811 from terminal to a file.I have tried google search and did not find any solution for that.Can anyone help me?I appreciate your help. Thanks Rose
  27. M

    How to read this file line by line and store contents in an array

    Hello, In my computational science class I have the task of taking the following input file and manipulating it. I have the following input file: C1 0 0.00 0 000.0 0 000.0 O2 1 1.22 0 000.0 0 000.0 H3 1 1.09 2 120.0 0 000.0 C4 1 1.54 2 120.0 3 180.0 H5 4 1.09 1 110.0 2...
  28. M

    Bash script - Monitor File Writes?

    I have a small problem that I would like to solve. I have an idea, but it's kind of half-assed and I'm not sure if there's a better way. The problem: I have a CFD solution that writes out a solution file everything 5 minutes or so. I currently am writing out 32 total solution files. So, when...
  29. Simfish

    Are Linux Environment Variables Stored on the File System?

    system? I know that it isn't possible in Windows since Windows has the registry and background variables that aren't stored on the file system for some reason. But what about Linux? Are its environment variables stored on the file system? Is there anything that isn't stored on the file...
  30. M

    MATLAB Extract data from a huge file using matlab

    extract data from a "huge" file using matlab hi guys, I need some help! I have a file(.txt) which concludes about 20,000 lines. There are not only number data but also letters and different characters in the file. I want to extract some certain useful data from this file and put them into a...
  31. L

    How to Open a File with a Variable Name in C?

    How to open a file with a name that is not defined in advance, but is entered after the program is executed? I am using fopen function, but it seems that it's argument must be a fixed string, not a variable.
  32. P

    Reading Separate lines from a file (C)

    What I want to do is to to read the number of processes, their arrival time, and then in the next line, their bursts. Here's the file format: P1 0 12 2 21 2 12 32 18 P2 9 13 17 3 21 45 67 21 2 (1st line) Process Arrivaltime (2nd line) Bursts (3rd line) Process Arrivaltime (4th line)...
  33. P

    Reading separate lines from txt file (C code)

    Homework Statement I want to read each line separately in a char array from a text file. As yet, the best I could do is to read the entire file in a single char array. How can I read each line in a separate array? Homework Equations The Attempt at a Solution #include <stdio.h>...
  34. S

    Generating NxN Matrix with Random 0s and 1s - MATLAB M File Help

    i am writing a MATLAB m file. i need to generate a NxN matrix 25% filled with 0s and 1s in a random pattern... is this at all possible? also, in an NxN matrix, i need to select a 3x3 matrix centered around a certain point, can you help me out with this? many thanks for your help
  35. C

    MATLAB Need help, Why is Matlab not writing to file?

    clc clear f = input('Enter the force applied in lbs: '); p_c = input('Enter point closest to pivot: '); p_f = input('Enter point farthest from pivot: '); filename = input('name of file is: ','s'); points = input(' # of points to calculate: '); x = [p_c;rand(points,1)*p_f-p_c+p_c;p_f]...
  36. L

    What is the issue with file organization in Vista and how can it be resolved?

    This thing is a mess. XP file organization was fine, but since when something works fine, people like to fix it (make it not work anymore), they made something simple into another reason to pull your hair out. I'm trying to put my music files in descending order for duration. I had to add a...
  37. rhody

    Seeking Secure File Storage Solutions

    I hope this post goes here, if not I apologize, admin's feel free to move it if needed. I need a place to store files listed in the title above where I can get link(s) for posting to forums, share with friends, etc... I use tinypic for posting pictures, and that works fine, but I need a...
  38. A

    Increase File Size: A Guy I Knew

    Anyone know how to increase the size of a file, without actually increasing the space occupied on disk. I knew a guy who did this.
  39. K

    Poisson and binomial distributions, corrupted characters in a file

    A text file contains 1000 characters. When the file is sent by email from one machine to another, each character (independent of other characters) has probability 0.001 of being corrupted. Use a poisson random variable to estimate the probability that the file is transferred with no errors...
  40. M

    List file names from a directory - Vietnames

    Hi everyone, I have a folder of Vietnamese songs (files). The file names are in Vietnamese. I used a VB6 program to create a list of file names and output them to MS-word. The program won't understand the Vietnamese characters, suc as ^, ., ~..., so it was represented by question marks...
  41. P

    Mathematica Mathematica File Import Question

    I'm an occassional Mathematica user (Ver 7.0.1.0). I'm doing something now where I need to import a couple of large Excel files, no problem with that. I'm wondering, however, if there is a procedure to make the resulting lists created by the imported data permanent so that I don't have to...
  42. S

    Mathematica How to 'activate' New mathematica package file

    Hi, I found this mathematica packages file and can't use it... "The "FixedTalbotNumericalLaplaceInversion.m" file should be placed into the AddOns folder on the user's computer" As written in the file, i need to save this file under AddOns folder. Done with that and yet still couldn't...
  43. F

    Calculators How to get a txt file on the stack (hp 50g)

    Hi, How to get a txt file on the stack (hp 50g)? Thanks.
  44. A

    Using grep to find a file that does not contain a word.

    I have a bunch of files that I want to find the ones that do not contain a word. I think that I can use grep to do this but I am not sure. does anyone know how to do this?
  45. H

    MATLAB How Can I Recover a Corrupted Matlab File After a Crash?

    Matlab: Urgent! My comp crashed and now I can't open my file anymore... it gives me this error message: http://i31.photobucket.com/albums/c374/haoming/matlab2938293.jpg Please help!
  46. CFDFEAGURU

    C/C++ Open a .pdf file from C++ Win32 Console Application

    Hello all, Does anyone know how to open a .pdf file (or a .exe) file from a Visual C++ 2008 express edition program? What I am trying to do is to have the user enter a number that corresponds to a certain .pdf file and have that .pdf file open for the user to read,save,print, etc ...
  47. A

    Fortran Fortran locate symbol in data file

    I need to look for the presence of '////' in my data file i could read it as character since i need to eliminate them from the file, I've tried to avoid them using if(xx .eq. '////') then but is not working the error comes as if(mt.ne. '////')then...
  48. A

    Fortran Fortran; Calling an executable that in turn runs an input file

    Hi. I need to write a fortran program that calls an EXE, call it "runner.exe" that in turn runs an input file, call it "run.inp". Thing is, I would normally run "runner.exe" manually, and type in "run.inp" and "runner.exe" gives outputs. But now, I have 100's of input files and I can't affod...
  49. G

    Fortran Find peak in the historgram data file - FORTRAN

    Hello guys, I have a file with X Y values (separated by space) I want to scan the data to find the PEAK in the file. (It will probably be a lowest Y point...) How do I do this is Fortran? Thank you, Alexander
  50. V

    LaTeX One bibliography file for several latex documents

    Hi, I have several tex documents that share the same mybibliography.bib file. Each of these tex documents have its own folder and in each folder I'm repeating the mybibliography file. My question is if there is a way to generate all my tex documents using just one bibliography file. Thanks!
Back
Top