is matlab right way to change text format?

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hello,

I'm trying to take data input and rearrange it in a particular way to
have headings, new columns, etc. They have also asked that I layout
the output with a specific number of spaces between columns,
headings, etc. Is matlab a good option for this? All of my
experience with matlab is numeric up to this point, so the way I
picture output is in matrix form, and I'll have many sections with
varying # of columns. Should I just isolate sections into particular
matrices and then print out the matrices one after another in the
output file (to make it look like one file)?

Thanks!
0
Reply geomegs 3/22/2005 6:07:38 PM

See related articles to this posting


geomegs wrote:
> 
> Hello,
> 
> I'm trying to take data input and rearrange it in a particular way to
> have headings, new columns, etc. They have also asked that I layout
> the output with a specific number of spaces between columns,
> headings, etc. Is matlab a good option for this? All of my
> experience with matlab is numeric up to this point, so the way I
> picture output is in matrix form, and I'll have many sections with
> varying # of columns. Should I just isolate sections into particular
> matrices and then print out the matrices one after another in the
> output file (to make it look like one file)?

Matlab wouldn't be my first choice for such a task if that's all you're
doing...

What other tools do you have/know?  I'm thinking of Perl or the like...
0
Reply dpbozarth (544) 3/22/2005 6:15:10 PM

Hello,

They asked me if I could do it in matlab so anyone could do it on his
or her own computer. Right now it's in fortran. There are 2
programs - one is to convert the raw data into a specific format with
headers and separate sections. The second program processes the data
mathematically, using the output from the first program.

I was wondering if I should use something else as well, but it needs
to be easily compiled on different machines. I was thinking maybe if
I break the sections into separate matrices and just view them that
way...I don't know.

Thanks!
0
Reply geomegs (5) 3/22/2005 7:10:29 PM

Sorry, I forgot to add I know php also.
0
Reply geomegs (5) 3/22/2005 7:12:41 PM

geomegs wrote:
> 
> Hello,
> 
> They asked me if I could do it in matlab so anyone could do it on his
> or her own computer. Right now it's in fortran. There are 2
> programs - one is to convert the raw data into a specific format with
> headers and separate sections. The second program processes the data
> mathematically, using the output from the first program.

Don't ken precisely...if I had a working Fortran routine(s) it would
seem simple enough to make any mods there required and distribute an
executable to whoever needs it...so must be some other requirement
behind the request...

> I was wondering if I should use something else as well, but it needs
> to be easily compiled on different machines. I was thinking maybe if
> I break the sections into separate matrices and just view them that
> way...I don't know.

What different platforms are you targetting?  Standardized Fortran would
be compilable on almost any platform popular today...
0
Reply dpbozarth (544) 3/22/2005 8:35:39 PM

Duane Bozarth wrote:
> geomegs wrote:
> >
> > Hello,
> >
> > They asked me if I could do it in matlab so anyone could do it on
his
> > or her own computer. Right now it's in fortran. There are 2
> > programs - one is to convert the raw data into a specific format
with
> > headers and separate sections. The second program processes the
data
> > mathematically, using the output from the first program.
>
> Don't ken precisely...if I had a working Fortran routine(s) it would
> seem simple enough to make any mods there required and distribute an
> executable to whoever needs it...so must be some other requirement
> behind the request...
>
> > I was wondering if I should use something else as well, but it
needs
> > to be easily compiled on different machines. I was thinking maybe
if
> > I break the sections into separate matrices and just view them that
> > way...I don't know.
>
> What different platforms are you targetting?  Standardized Fortran
would
> be compilable on almost any platform popular today...

Yes, especially because free Fortran compilers such as g95 and g77 are
available on many platforms. For text processing, though, I would
recommend Python, Perl, or even good old awk (gawk) for simple tasks.

0
Reply beliavsky (2211) 3/23/2005 2:30:44 PM

beliavsky@aol.com wrote:
> 
...
> ...For text processing, though, I would
> recommend Python, Perl, or even good old awk (gawk) for simple tasks.

But there (apparently) is some processing as well...and to simply read a
text file and format it, Fortran wouldn't be much trouble at all.  Would
be nice to have a better description of what is really needed/wanted/why
Matlab was suggested to begin with...
0
Reply dpbozarth (544) 3/23/2005 2:57:29 PM

Duane Bozarth wrote:
>
>
> beliavsky@aol.com wrote:
>>
> ..
>> ...For text processing, though, I would
>> recommend Python, Perl, or even good old awk (gawk) for simple
> tasks.
>
> But there (apparently) is some processing as well...and to simply
> read a
> text file and format it, Fortran wouldn't be much trouble at all.
> Would
> be nice to have a better description of what is really
> needed/wanted/why
> Matlab was suggested to begin with...
>

Originally, it had something to do with being able to use it on any
platform. I don't know anything about how fortran compiles, so I
didn't question this. I'll ask again and get back to you.

Thanks!
0
Reply geomegs (5) 3/23/2005 4:32:54 PM

geomegs wrote:
> 
> Duane Bozarth wrote:
> >
> >
> > beliavsky@aol.com wrote:
> >>
> > ..
> >> ...For text processing, though, I would
> >> recommend Python, Perl, or even good old awk (gawk) for simple
> > tasks.
> >
> > But there (apparently) is some processing as well...and to simply
> > read a
> > text file and format it, Fortran wouldn't be much trouble at all.
> > Would
> > be nice to have a better description of what is really
> > needed/wanted/why
> > Matlab was suggested to begin with...
> >
> 
> Originally, it had something to do with being able to use it on any
> platform. I don't know anything about how fortran compiles, so I
> didn't question this. I'll ask again and get back to you.

Knowing what system(s) you're looking at running on, etc., would help.
0
Reply dpbozarth (544) 3/23/2005 4:35:35 PM
comp.soft-sys.matlab 203652 articles. 536 followers. Post

8 Replies
99 Views

Similar Articles

[PageSpeed] 1


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Change the format of text file generated from MATLAB code
Hello I am generating a text file using MATLAB which looks something like this 6.9905301e+001 6.9193786e+001 7.0975918e+001 7.5127181e+001 7.7340259e+001 8.0573000e+001 8.3738719e+001 8.1974246e+001 7.9527688e+001 8.0201600e+001 7.9433180e+001 7.9606963e+001 7.8440122e+001 7.7089076e+001 7.7316589e+001 7.8372644e+001 8.1083666e+001 8.2169213e+001 8.0140552e+001 7.9732129e+001 I want these numbers in the format of decimals only, no powers. For e.g. I want 699.053 rather than 6.9905301e+001 and so on. Is there any way of doing this using MATLAB? Thank you in advanc...

Changing the format of text
I'm need to be able to run a query that compares some time data. The problem is the format of the text. The text it being pulled from an ODBC source so I can't change the original data to match. One set of data is formatted to hh.mm (10.33) and the other is hhmmss (103400) I need to find a way to match the second format to the first. I've tired changing the field type in the table and it just drops needed information. Can anyone thing of a way to change the data? Bill wrote: > I'm need to be able to run a query that compares some time data. The > problem is the format o...

Change text format
Hello, I'm dumping a bunch of data from an array into a text box. How can (if it's possible) I change the appearance of certain lines in order to present a better display as I iterate through the array? i.e. I want certain lines to have a larger font size, bolding, italic etc. but not the entire text box. Thanks Gord > I'm dumping a bunch of data from an array into a text box. How can (if it's > possible) I change the appearance of certain lines in order to present a > better display as I iterate through the array? i.e. I want certain lines to > have a l...

changing the format of a text file
Hello everyone, i am new to ruby and im having some problems trying to reformat a text file. Basically, i have a large log file which is around 200mb in the following format: ---------------------------------------------------------- 1000000 name Status :A Basetype :2 Version :1.0 | | (more fields) | Name :/file/name/etc 1000001 name Status :B Basetype :2 Version :a20 | | Name :/file/name/etc 1000002 name Status :C | ... and so on so for...

Is there a way to trim text in Matlab?
Could anyone tell me if there is a function which would allow one to take part of a string somehow. For instance, let's say I have: a = 'redcar' and I'd like b to be 'red', is there something like: b=left(a,3) in Matlab or some similar function which would allow me to do this? OA wrote: > > > Could anyone tell me if there is a function which would allow one > to > take part of a string somehow. > > For instance, let's say I have: > > a = 'redcar' > > and I'd like b to be 'red', is there something like: > ...

Way(s) to change text?
I know it is easy to change text styles, fonts etc., using JS, as for example below: <div id="example">Text text text</div> <script... document.getElementById("example").style.fontSize="110%"; </script> But what way(s) exist to change the actual text itself? Eg. dynamically change the string "Text text text" to "Bla bla bla" ? michael <nomail@example.com> wrote: > I know it is easy to change text styles, fonts etc., using JS, as for > example below: > > <div id="example"...

Changing the format of dates in MATLAB
Hello, I am not very proficient in string handling so Ill do my best to explain. I have list of thousands of dates in this format in a .txt file 09/15/1992 08/19/1998 .. .. .. mm/dd/yyyy and my goal is to convert them to this format 1992 09 15 1998 08 19 .. .. .. yyyy mm dd but the problem is that I can't seem to copy and paste the initial date data and get it into a usable form. I am unable the turn it into a string or anything that MATLAB doesn't regard as an error. I am fine with writing a new function to perform this task or use MATLAB ones. Not rea...

right-format of integer output as text
hi all, I need printing the following: 1 2 3 .... 9 10 .... 99 100 .... 999 1000 1001 .... how can I implement this one in the simpliest way? Thank you in advance, D. In <1173984339.188538.200880@l75g2000hse.googlegroups.com>, dmitrey wrote: > how can I implement this one in the simpliest way? > Thank you in advance, In [45]: '%10d' % 1 Out[45]: ' 1' In [46]: '%10d' % 42 Out[46]: ' 42' In [47]: '%10d' % 10000 Out[47]: ' 10000' Ciao, Marc 'BlackJack' Rintsch There are so...

Changing text size in Matlab GUI
I need the code to change the text font size in GUI. Not that kind where u can just change by clicking on the property inspector for eg, of a button or pop up menu. Thnks! Angel, My suggestion as follow - set(handles.listbox_FileList,'FontSize',20); NOte: listbox_FileList is the Tag of my list box. And 20 is the font size number. regards, elaine Angel wrote: > > > I need the code to change the text font size in GUI. Not that kind > where u can just change by clicking on the property inspector for > eg, > of a button or pop up menu. > Thnks! ...

preferred way to change MATLAB files?
Hi there, I have recently had the need to load tag info for a TIFF file (using imfinfo), but the tags I was interested in were not supported (XPosition and YPosition, 286 and 287, respectively). It was easy enough to find in the 2007b MATLAB code where I could insert the relevant bits, and I have (reluctantly) changed the file imtifinfo.m While this approach obviously works, I was wondering if there was a preferred way to achieve the same thing? This is a trivial example, but I could imaging other stuff like bug-fixes etc. Best regards, Dietrich ...

Change formatting from matlab fig to eps
Hi, How do I Change formatting from matlab fig to eps? I can save matlab figure as eps but I can not open it. Can I insert eps figure in word file? Thank you, Som On Sep 29, 12:20=A0am, "Sunipa Som" <sunipa_...@yahoo.com> wrote: > Hi, > How do I Change formatting from matlab fig to eps? I can save matlab figu= re as eps but I can not open it. > Can I insert eps figure in word file? > Thank you, > Som Here's one way, assuming you have the figure open: print('-depsc','-tiff',epsfile) where epsfile is the name of the file you write to. N...

visualizing formatted text in unformatted way
SITUATION y = sprintf('a\nb'); THEN disp(y) prints the output in a formatted way on the screen: first it prints 'a', then it goes to the next line and then prints b. BUT Once i have y, how do i get to view the original string ('a\nb')? disp(y) gives the formatted output, and the array editor doesn't seem to give the correct results either (it just cuts away all spaces and newlines). BTW You might wonder why i actually need to do the inverse operation. I'm writing a couple of functions for processing of input (txt) files, and want to check the functioning of t...

Strange text format change in emaim
I'm using Eurora 5.2 in sponsored mode on a PC running NT 4.0. Occasionally I'll receive an email where some lines of text have a space in the middle of a word and then all the following words on that line are joined together with no spaces between them. I've even copied that bad text to a hex editor and cleaned up the incorrect format and re-sent it to myself and it still arrives messed up, even though it looks OK in the out mailbox. I'm stumped. Does anyone have any experience or suggestions?? Thanks in advance. Joe K. Joe K <joesk@ix.netcom.com> wrote:...

Any way to change the text of a compound image?
Hi all, I have a compound image with text underneath. Is it possible to change the text after the Tk::Compound object has been created? I can't seem to be able to access anything inside my compound object via children/Subwidgets/etc, and the return value of the $compound->Text() call is an empty string. --Ala On Fri, 08 Oct 2004 00:44:37 GMT, Ala Qumsieh <notvalid@email.com> wrote: >Hi all, > >I have a compound image with text underneath. Is it possible to change >the text after the Tk::Compound object has been created? > >I can't s...

Know a way to change text color in a JTextArea?
Hi folks, I have a JTextArea in which I'd like to display different lines of text in a variety of colors. That is, one line of text may be red, while the next is blue, and so on. There has *got* to be an easy way to do this, but after searching the docs, as well as various forums and faqs, I haven't seen anything that would hint at how to do this. If anyone here can at least point me in the right direction on this, I'd really appreciate it. Thanks! Andrew D. Biggs wrote: > Hi folks, > > I have a JTextArea in which I'd like to display different lines of text in ...

script to change selected text format, please
can anyone help with script so that i can press a radio button and change the selected text format (i.e. bold red) thanks in advance weather in Isle of Axholme, England, sunny 13 degrees c, sun shining on lovely flame red autumn leaves. best regards mal malawayfromhome@hotmail.com Hi Mal, You don't need a script. Here's what you need: 1. A field with your target text (e.g. "Name") 2. A field validated by a value list that has your choices (e.g. Red and Blue; we'll call it "select" for this example). Format this as Radio Buttons. 3. Two calculation fields. I...

Way(s) to dynamically change text content
I have an html text string within a div, eg.: <div id="example">Text text text</div> I know its easy to change styles by using getElementById - for example: document.getElementById("example").style.fontColor="#ff0000"; But what way(s) are there to change the actual text content itself on the page dynamically, from "Text text text" to"Bla bla bla" ? Can it be done with JS/CSS? In article <crbpde$nn7$00$1@news.t-online.com>, nomail@example.com says... > I have an html text string within a div, eg.: > > <div ...

right-format of integer output as text #2
hi all, I need printing the following: 1 2 3 .... 9 10 .... 99 100 .... 999 1000 1001 .... how can I implement this one in the simpliest way? Thank you in advance, D. ...

Is ther a way to change MATLAB Key Bindings?
Is there a way to change Control Key bindings in MATLAB? Some users are accidently hitting CTRL-B (when trying to do a paste using CTRL-V) which causes MATLAB to go off and do a lengthy build. Can CTRL-B be disabled or changed to something else? Eric wrote: > > > Is there a way to change Control Key bindings in MATLAB? Some > users > are accidently hitting CTRL-B (when trying to do a paste using > CTRL-V) which causes MATLAB to go off and do a lengthy build. Can > CTRL-B be disabled or changed to something else? The answer is in my thread "Shift-Del doesn't cut ...

change a line in a matlab input text file
hi, I want to edit a random line in input file. the line is randomly placed in the file. I want to go to that line and change the numbers here is a part of the input file (look familiar) I want change the line "MAT8 13 181000. 181000. .28 7170. 7170. 5000. 1.6-9" to "MAT8 13 181.000 181.000 .28 7.170 7.170 5.000 1.6-9" regards ------------------------------------------------------------------------------- $ Elements and Element Properties for region : pcomp.11 $ Composite Property Record created from material record : pcomp.11 $ Composite ...

Is there a way to change the color of the text fields in html?
Hi All, Recently went through the site www.google.com/adsense Was really surprised to see how the color of the text fileds and button on the right frame ,which is used for login ,changed from 'plain' to 'yellow'. Can anyone please let me know,how this is done.Is it something simple attribute recommended by W3C,or is it just another googled technology. Thanks in advance. -Pradeep pradeepsarathy@gmail.com wrote: >Recently went through the site www.google.com/adsense >Was really surprised to see how the color of the text fileds and button >on the right ...

Text in bottom right corner
I want to put text for a copyright notice into the bottom right corner of my page. When I say "bottom right," I mean that it will float there regardless of how the browser window is resized. I _think_ that what I have so far works well for this positioning purpose: <p class="copyright">All materials on this website &copy; Copyright 2005</p> Where the CSS is: ..copyright { position: absolute; bottom: 1em; right: 1em; text-align: right; } However, if the browser window is reduced substantially in size, then this text inevitably comes up...

A simple question: Changing text format (color and size)
Hi, I'm completely novice in win32 programming. Here hoes my question: I am writing text on the window by the TextOut() function. It works well but i want to chang the size and color of the text. Which function i must use for that? (Formatting the text for the TextOut() function) Thanks to all! Use CreateFont to make your font-style, and select this font into your HDC by using SelectObject. Use SetTextColor/SetBkColor to set the colours Then restore the DC when you're finished James -- www.catch22.net Free win32 software, sourcecode and tutorials ...

Should say: Strange text format change in EMAIL Duh!
Sorry for the bad spelling above! ...