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...
Homework Statement
Big-Oh Run-Time Calculations
The OS File Manager manages files and the directory structure. Two common disk
formatting methods exist: disks formatted in blocks using an inode and the classical bytedriven
semi-contiguous file using pointers after each contiguous portion...
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.
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)...
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>...
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
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]...
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...
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...
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...
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...
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...
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...
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?
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!
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 ...
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...
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...
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
Hi. I'm writing a program in OpenCL but I'm very new to xcode. Basically, my program executes a kernel that exists in a separate file. I'm not sure if the code is completely correct, but the program won't build and when I do try to build it I get this error :
Build GPU translate of project...
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!
Hi All,
I want to create a website which only I can access, so that I can stor my files on.
When I upload my files, and click on them, they automatically open (for example, a music file loads in quicktime through firefox and plays). I want it so that it offers me to download the file, not...
i scanned french document and save it as image file to translate it
but how can Capture Text form image and save it as txt file or word file
which software will without need the scanner ?
Hi, I'm just wondering, usually when I output to file in C++ I just do like:
fout.open("output.txt",ios::out);
fout.precision(13);
fout << data1 << " " << data2 << " " << data3 << endl;
or something to that effect. i.e. I use c++'s file streams. However, for my current application...
I have a engineering design project this year that I am going to be doing with a group of 4 other fellow students. I know google has something online where you can load documents and modify them online but it seemed to mess up the formatting quite a bit. I would like something where we can load...
Hello,
I have a little problem linking the CGNS libraries.
I tried linking the CGNS libraries with the compiler, but the same error shows, viz. "CG_OPEN_F is an undefined reference". I guess this has probably got to do with modifying the lib and include path or something like that.
Right...
Hello all,
I am using C++ 2008 Express edition to create a .dll file for use in C# and I am receiving the following error from my compilier.
"regsvr32.exe cannot be found"
I have all of the properities set correctly for the .dll creation and the .def file is specified correctly.
Does...
Not that this is really an astronomy question per se, but astronomers are most likely to know the answer.
I have a file containing a sky survey that is in healpix format, and I need to extract the data at certain longitudes and latitudes and at certain frequencies...
In a traditional fits...
Okay then :smile:
Here is a piece of the code that I am using:
' Send to File
MyPath = "Z:\Casey B\MathML Converter\" & "MathMLAsString.txt"
fNum = FreeFile()
Open MyPath For Output As fNum
Print #fNum, EntireMLText
Close #fNum
This saves my work to a text...
Hi there,
I have generated a huge data file (approx 500MB large) containing a few 100k lines of formatted data (format(1X, 200ES11.4)). As I believe handling such a large file might over and over again (will be opened by an explicit FE code) might slow down the process significantely, I was...
Go To Post #7 for new Question :smile:
So let's that I have a .txt file called input.txt that simply contains the following:
abc+123
I want to load input.txt using VBA into a 1-dim array called MyArray. I want each character to be an element of the array. That is a is MyArray(1), c...
I am running (a very basic) simulation of the proposed LIFE concept reactor at LLNL as part of my MSc thesis. What I hope to achieve is to calculate the fission energy gain from a fissile blanket surrounding a source of fusion neutrons (ie D-T pellet blasted by lasers)
The problem summary...
I have a pdf file and I need to save to disk only part of it, not the whole document. Does anyone know how to do that?
I have the LaTeX file and I can of course LaTeX only part of the file but the problem is that the references in the part that I LaTeX are then not working since they refer...
Hi All
I'm completely new to Fortran 90 and I have to create a program that opens a formatted data file and reads in certain values into my program's variables. The variables are represented in the first six rows with ncols, nrows, xllcorner, yllcorner, cellsize and NODATA being the...
Hello. I'm completely new to programming, and I'm having some troubles with a Fortran program I'm writing.
I have an input file containing three columns, where each column contains a couple of cartesian coordinates (column 1 contains various x coordinates, and so on). What I would like my...
Hi all,
I have a problem.
Someone I know encrypted a text file using AES128 by using binary key file, (He generate the binary key).
After that he uses "base64Encode" over the encryped file
I have the private binary key file.
Now, when I'm trying to decrypt the file, I do as follow...
Hello,
I am running a fortran f90 program and am writing outputs to several files,
the thing is I would like them to be written to a specific folder to better manage outputs
and so leaving the program directory clean.
here's a sample write sentence:
open(unit=3...
Hello. I am trying to create a VB6 program that would keep track of date and time when a new file was created. And and plot it in a graph.
What VB6 command can allow me to convert file date and time stamp into a variable?
What command can help me move a file from one folder to the other...
I just downloaded the file covtype.data.gz and it is quite a large file about 75Mb. But I do not know how to read the file. Please tell me what to do.:cry:
I'm using window XP and I know how to unzip dot zip or dot rar. However my computer doesn't recognized the new file format. Why it is...
Hi..am just learning c++...i have a doubt..
Suppose you have a header file and you include it in your main program by using the #include directive..then do you have to compile the header file separately? Or does it get compiled with the main program?
Hi
I want to sort the data in output file by Fortran transfer file.
when I do ./transfer<output>data1
It gives an error message:
invalid number: incomprehensible list input
apparent state: unit 5 (unnamed)
last format: list io
lately reading direct formatted external IO
Aborted
can...
hi,
i want to display into IDL a mollview projection of the output fits file ('test_scalCls.fits') of CAMB program (Code for Anisotropies in the Microwave Background) but can't get it.
I have IDL ASTRO, Healpix_2.11c and WMAP librairies and i tried several things:
1*/
HIDL>...
My computer can't read these files and I was wondering if you know a safe site I can download a program to read them? thanks..
(sorry I posted this in the sub-form, thought it would get more responses here)
Hello!
I am running ubuntu, I have a copy of open office excel, but I need to edit a tab space delimited text file with my data in it so I can use gnuplot to plot it.
The editing consists of subtracting one column of data from a file, from another column of data in another file. Each row...
Hello,
I am currently using a Fortran program to run a simulation which involves an explicit differentiation loop. The program currently plots simulation data at specified time intervals using a subroutine with another program. I'd like to have the program also output data files at these...