Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
to save number of .txt files back after process

Subject: to save number of .txt files back after process

From: muzaffar

Date: 23 Jan, 2008 15:19:04

Message: 1 of 3

Hello everybody,
i have a problem with my data.
.txt files with first fives lines
starting with # and all other lines digits.
i am using

data1=textread(longefilename,'','commentstyle','shell');

to load data ignoring five lines starting with # but
losing original format of .txt files which i need after
processing numeric data.
So i am able to load number of .txt files into matlab
can accesss required data and process.

so my questions are.

1. how i can process data without losing original format.
2. how i can save data back after processing data.

Thanks for guidance.

Subject: to save number of .txt files back after process

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 23 Jan, 2008 15:37:07

Message: 2 of 3

In article <fn7lt7$dkd$1@fred.mathworks.com>,
muzaffar <muzaffarbashir@yahoo.com> wrote:
>Hello everybody,
>i have a problem with my data.
>.txt files with first fives lines
>starting with # and all other lines digits.
>i am using

>data1=textread(longefilename,'','commentstyle','shell');

>to load data ignoring five lines starting with # but
>losing original format of .txt files which i need after
>processing numeric data.

Instead of using commentstyle, use headerlines. Oh, and instead
of textread(), use textscan() if your Matlab supports it.
--
   "Okay, buzzwords only. Two syllables, tops." -- Laurie Anderson

Subject: to save number of .txt files back after process

From: muzaffar

Date: 23 Jan, 2008 17:00:21

Message: 3 of 3

well my problem is not solved yet
the problem is not solved yet
i want to access digits and after processing save back
into the original format

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <fn7mv3$jkd$1@canopus.cc.umanitoba.ca>...
> In article <fn7lt7$dkd$1@fred.mathworks.com>,
> muzaffar <muzaffarbashir@yahoo.com> wrote:
> >Hello everybody,
> >i have a problem with my data.
> >.txt files with first fives lines
> >starting with # and all other lines digits.
> >i am using
>
> >data1=textread(longefilename,'','commentstyle','shell');
>
> >to load data ignoring five lines starting with # but
> >losing original format of .txt files which i need after
> >processing numeric data.
>
> Instead of using commentstyle, use headerlines. Oh, and
instead
> of textread(), use textscan() if your Matlab supports it.
> --
> "Okay, buzzwords only. Two syllables, tops." --
Laurie Anderson

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us