Register to reply

Generating data file in matlab

by balogun
Tags: data, file, generating, matlab
Share this thread:
balogun
#1
Aug27-07, 08:46 AM
P: 14
1. The problem statement, all variables and given/known data

I have a retake in matlab and in my briefing they said i will have to generate a data file and analyse it.Can someone please tell me what a data file is and how you generate it.
I have used the help function in matlab but did not find it very useful .
Thanks in advance.

2. Relevant equations



3. The attempt at a solution
Used help function but not useful.
Phys.Org News Partner Science news on Phys.org
New type of solar concentrator desn't block the view
Researchers demonstrate ultra low-field nuclear magnetic resonance using Earth's magnetic field
Asian inventions dominate energy storage systems
chroot
#2
Aug27-07, 02:58 PM
Emeritus
Sci Advisor
PF Gold
chroot's Avatar
P: 10,427
Your question is so hopelessly vague that no one here will be able to help you with it. MATLAB includes many functions that can be used to generate data sets, but you've given us absolutely no information on the kind of data you want. It also includes functions which can be used to write arrays out to files on the disk.

- Warren
balogun
#3
Aug29-07, 05:50 AM
P: 14
Sorry didn't know there were many different kinds of datafiles.I dont really know the type of datafile his gonna give so i thought there should be some kind of general method.But from the last coursework i was given he asked for an ascii datafile.

chroot
#4
Aug29-07, 01:57 PM
Emeritus
Sci Advisor
PF Gold
chroot's Avatar
P: 10,427
Generating data file in matlab

Is the data supposed to be a sound, or a picture, or a one-dimensional random signal? What's the distribution supposed to look like? What's the meaning of the data? Is it supposed to be one column in a text file or twelve? One point or ten billion points? Floating-point or fixed-point or integers?

You've given us no information at all about how to help you. It's as if you went into a library and told the librarian you were looking for "a book."

- Warren
Ouabache
#5
Sep4-07, 02:34 AM
Sci Advisor
HW Helper
P: 1,326
As chroot has mentioned, it would be helpful if you described an example.

A data file , as you have described it, is information that can be 'used by' (input) or 'generated by' (output) a computer program.

Since you want to generate a data file, you are interested in input/output syntax. That's true for any computer language, however for matlab it may begin with something like ---> FID_out=fopen('test_io.dat",'w');
Here's tutorial that illustrates this concept.


Register to reply

Related Discussions
MATLAB : how to get the data from a .fig file ? Math & Science Software 2
Matlab file saving. Math & Science Software 3
Help Scanning File Data In C! Engineering, Comp Sci, & Technology Homework 1
MATLAB: Using WavWrite to Create a Single Audio File Math & Science Software 3
Find fourier coefficients from .wav file (Matlab?) Math & Science Software 0