is matlab right way to change text format?

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
geomegs
3/22/2005 6:07:38 PM
comp.soft-sys.matlab 207178 articles. 0 followers. lunamoonmoon (258) is leader. Post Follow

8 Replies
124 Views

Similar Articles

[PageSpeed] 20
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
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
geomegs (5)
3/22/2005 7:10:29 PM
Sorry, I forgot to add I know php also.
0
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
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
beliavsky (2212)
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
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
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
dpbozarth (544)
3/23/2005 4:35:35 PM
Reply:
Similar Artilces:

MATLAB's SOUND() function in C
Is there a way to implement MATLAB's sound function under C? For those who don't use MATLAB, it's essentially a simplistic, static, mono sound function that converts a series a numbers into a sound at a given sampling rate. nothing fancy. all the Sound APIs begin by discussing all the fancy drivers and buffers and crazy shit i don't really care about. Thanks. In article <1151779016.882805.282580@d56g2000cwd.googlegroups.com>, sluox@yahoo.com wrote: > Is there a way to implement MATLAB's sound function under C? > > For those who don'...

How do you do ARIMA in matlab?
Hi, (Sorry for cross-posting) I am clueless w.r.t using matlab for time series. I have a time series and I would like to make estimates of future using the past. How do I develop a ARIMA(p,q,r) model in Matlab. Thanx a lot Vamsi help armax (system identification toolbox) /Johan Bala Vamsi Tatavarthy wrote: > Hi, > (Sorry for cross-posting) > I am clueless w.r.t using matlab for time series. I have a time series > and I would like to make estimates of future using the past. How do I > develop a ARIMA(p,q,r) model in Matlab. > > Thanx a lot > > Vamsi > ...

Datasheet Subform
I have a subform that displays a datasheet. There are a couple of different queries that can be displayed in the datasheet. The queries are available in a combo box on the main form. The problem I am having is that when I change the query all the column widths remain the same. This doesn't look very good. I can't figure out a way to set the column widths. I have tried.. Subform.controls(Name of Column).columnwidth = IntColumnWidth However, It doesn't change the width of the column in the subform and if I debug.print Subform.controls(Name of Column).columnwidth i dont get a...

Cannot open *.fig files from MATLAB 2008b in MATLAB 2014a
Like in subject, I cannot open figures made in MATLAB 2008b in MATLAB 2014a environment. Scenario: copy *.fig files from 2008b environment into 2014a, set paths with subfolders, try to open *.fig in 2014a. I would like to have a confirmation if it is compatibility problem or not. Here is the answer form MATLAB in Command Window java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.String; at com.mathworks.toolbox.matlab.guide.LayoutEditor.completed(LayoutEditor.java:2217) at com.mathworks.toolbox.matlab.guide.LayoutEditor$ReadFigureCompleted.completed(LayoutEditor.java...

Symbolic toolbox
Hello is there any way (function, parameter) how to convert output from symbolic toolbox operations to be formated for element-by-element operations? ./ .^ .* ? (just to add the dot in front of the operation) I know, I can use find and replace function, but it take some time. Some function doing this conversion would be helpful. :-) Michal "Michal Lukac" <michal.lukac@fstroj.uniza.sk> wrote in message news:jqsep6$qgi$1@newscl01ah.mathworks.com... > Hello is there any way (function, parameter) how to convert output from > symbolic toolbox operations to be ...

How to create a DLL for LabVIEW in MatLab
I want to use MatLab-Code from an M-file in LabView without MatLab. So i decide to use external code in a DLL. Can anybody give me some hints - how to do? (How to create, how to use?) Used System Windows 98, LabVIEW 6.1, MatLab 6.1 R12.1 Thanks Hi, I use Matlab-Code in Labview and it's don't need create a dll. The LV was a tool, matlab script, you can write your code Matlab here. see the examples of LV.I think the lV 6.1 have. Dll it's very complicated :D I would like to use LabVIEW !without MatLab. If i use these solution i need MatLab too. I've investigated and i think ...

Pro Grade 3/8" Dr Right Angle Air Drill
Price:$131.99 Image: http://thediscountguru.info/image.php?id=B0013YZO0S Best deal: http://thediscountguru.info/index.php?id=B0013YZO0S A professional quality 3/8" Angle Head Reversible Air Drill. * 90 degree angle head design * Lightweight for fatigue free handling * Compact design for close quarters operation * Paddle trigger for feather control * 3/8" angle reversible angle drill * free speed : 1,900 rpm * Overall length : 7-1/4 ins(210 mm) * Weight : 2.42 lbs(1.1kgs) * spindle size : 3/8"x24 unf * Inlet size: 1/4" NPT * Hose size: 3/8" * Air consumotion: 4 C...

Changing the style level in titles for ODS RTF output
Dear all, I am trying to find a way to change the style of the titles to "Heading 1". Do you know the RTF code one can add to the title to do so? Or, do you know any other way to have this done? I want the level to be added to the style of the titles to have more control on the "Table of contents", but I cannot find any documetation about this style element in SAS or RTF. Kind regards, Erwin Zelhorst Erwin Zelhorst SAS Programmer Clinical Trial Operations BV PO Box 451 5340 AL Oss The Netherlands Tel: +31 (0) 412 653065 Fax: +31 (0) 412 692889 Web: http://www.cto.n...

Re: Learning to program better and in a more organized way #38
Summary: Up to now Peter has gotten some good advice. Its time to organize this thought with examples. #iw-value=1 Mary, I don't have your advantage of doing a lot of statistics, but I do have a lot of experience in thinking, and I would think that how you want the data arranged would depend on the entities you want to analyze. Say I have people and want to predict income based on the titles books read. Why would it be wise to arrange the data as Id Income Book1 - Book1000 None of the Book columns have an meaning from one observation to another. Wouldn't y...

MATLAB mistaken a structure with a figure
I have some *data* structure S that I save in matfile save xxx.mat -struct s With V 2014B I get the warning message Warning: Figure is saved in D:\Documents\MATLAB\XXX.mat. Loading this file recreates and displays the figure and its contents. Refer to save for more information. K>> [~, b] = lastwarn b = MATLAB:Figure:FigureSavedToMATFile It looks like MATLAB mistaken my data with a figure. This works fine under 2014A and previous. Annoying. Some how I feel I will have a lot of works to do to adapt my codes for the new release 2014B. Bruno ...

Streamlines in Matlab
Hi guys, I am very new to matlab, so any help at all would be very much appreciated. I am attempting to plot the streamlines for a streamfunction with contour lines: C (=constant) = y/3 - 3y/ [(x- 3/2)^2 + y^2] Would anybody be able to help me with this? Thank you very much for your time. On Feb 21, 3:59=A0am, ben <bl...@ic.ac.uk> wrote: > Hi guys, > > I am very new to matlab, so any help at all would be very much appreciate= d. I am attempting to plot the streamlines for a streamfunction with contou= r lines: > > C (=3Dconstant) =3D =A0y/3 - =A03y/ [(x- 3/2)^2 =...

20 New MATLAB and Simulink based books #2
As you may know, The MathWorks Book Program supports authors and publishers that develop books that utilize MATLAB or any products developed by The MathWorks. We are pleased to announce the addition of 20 new titles to our web site. Below is the list of new titles, separated by category. For more information about these titles, or to learn more about the MathWorks Book Program, please visit our web site at: <http://www.mathworks.com/support/books> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - COMMUNICATIONS Title: Detection and Estimation Theory and Its ...

Obtain error message from MATLAB engine
Hi, I use the MATLAB engine to control MATLAB from a custom C program. Everything works fine, I can open the engine and send commands via engEvalString(). However, I would like to how to retrieve the error message from MATLAB if the sent command caused an error. I managed to obtain the output of valid commands through engOutputBuffer(), but it appears that error messages are _not_ placed in the output buffer. But surely it must be somehow possible to come by them? Hi John, How about using engEvalString() to execute the lasterror MATLAB function? That's all I can see. I used the COM ser...

Photosmart prints blank right side
For some reason now whenever I print to my HP Photosmart 7350 it gives me a error message saying the photo tray is engaged when it actually is not and when I hit OK and proceed to print it only prints the left side of a page. The left side will have the words or the left side of a photo and the right side is blank, cutting off the text or photo Any ideas on why this is happening and how do I resolve this??? Thanks in advance (cartridges are full and this doesn't happen to my 4x6 prints) ...

Can't type in Text/Entry fields
I now have a new problem! :) All of my widgets are working except for Text and Entry boxes. I am unable to type into those boxes! My mouse pointer cursor turns into the "I-beam" when it's over the text box, and I can highlight existing text (previously inserted via -textvariable and insert). But there is no text entry cursor, nor can I type into the boxes! Whatever I type on the keyboard just shows up in my xterm window, even though the Perl/Tk application has focus. Any idea what would be causing this problem? Everything else seems to work fine at this point. The p...

Problem with Modelsim 6.5 and Matlab/Simulink 2012a version
Sir, I'm using Matlab 2012a (32 bit) in my Windows 7 (64 bit) os and Altera web edition 9.1 (32bit)and Modelsim 6.5b (bit). When I tried to RUN MATLAB EXAMPLE: Verifying Viterbi Decoder Using ModelSim or Creating an FPGA Domain Model (dxpcSGIO301servo_fpga ) I got Warning: ModelSim Altera edition is not supported by HDL Verifier > In hdlsim>l_ParseVsimVersion at 1068 In hdlsim>l_GetModelSimLibInfo at 527 In hdlsim at 115 In vsim at 106 AND: at Modelsim: # ** Error: (vsim-FLI-3155) The FLI is not enabled in this version of ModelSim. # ** Error: (vsim-F...

matlab pool
may i knw what is batch job, matlab pool in parallel computing I am sorry, but I think you need to be a bit more specific in your question. Did you look in the documentation before you asked this question? --DA "Daniel Armyr" <firstname@lastname.se> wrote in message <ghj5it$g1n$1@fred.mathworks.com>... > I am sorry, but I think you need to be a bit more specific in your question. Did you look in the documentation before you asked this question? > > --DA In R2006b , there havn't give any information regarding matlab pool or batchjob in the documentatio...

Re: Best Way to Answer a Business Phone? #23
> Mr Joseph Singer <joeofseattle@yahoo.com> wrote: >> I've made it my policy that if I'm waiting in line to be served and >> the sales clerk thinks it's *more* important to take a telephone >> interruption than to serve me I'll put down my purchase and walk out >> of that store. Telephone customers do not have any more clout than >> customers who are in front of you. I'm a little more lenient. I figure the caller has no idea that there's a queue for the clerk's attention. I let the clerk answer the phone, and if ...

General Java Matlab lib questions
Am somewhat of a Matlab noob and I have some general questions, maybe someone could comment: - Can I write a Java app that could take as input the following: - Data from an external source (say a database) that represents Matlab variables (like matrices) - A string that represents a Matlab expression that is a function of these variables And then produce the output of the expression, in the form of a matrix or a scalar. In other words, is it possible to parse a string that represents a Matlab expression and execute the expression in the Matlab environment from Java? ...

change fonts in putty
Dear all, Anyone know how to increase the font selection list on Putty??? the default ones are not nice to work with. Cheers John John <news2003@wanadoo.es> writes: >Anyone know how to increase the font selection list on Putty??? Install more fixed-width fonts? ...

Endian problems
I have an application previously running on Big Endian machine communicatin= g with a client simulator through socket. This client is coded in Java runn= ing on a separate machine. The data exchanged between them have different s= tructures down to bits and bytes. Currently, this application is being ported to GNAT running on RH 5.4 (Litt= le Endian PC machine). As the result, both application and client do not co= mmunicate correctly any longer due to endian mismatched. The reason is that= Java VM uses Big Endian format even though the client runs on a PC. So far, I have come up with a cou...

matlab and differential equation
write a program to show the variation of time constant with change in the capacitance of a seried RC circuit(first order system).Also plot voltage across capacitor vs time. avnish gaurav wrote: > write a program to show the variation of time constant with change in the capacitance of > a seried RC circuit(first order system).Also plot voltage across capacitor vs time. I already did that, and I turned it in on time for my high-school programming course in 1977. Were you hoping for a copy of my punch-cards ? The print has faded badly on them, but you should be okay if you can sight-read...

Setting both y-right and y-left axes while using plotyy
Greetings. I have the following problem: I'm trying to plot a data series with the command plotyy as you can see in the code below: x = [0.81 4.07 8.14 40.72 81.43 122.15 162.87 407.17 814.34 4071.71 8143.42]; % x axis y1 = [2.50E-04 1.74E-04 1.38E-04 5.08E-05 2.83E-05 1.97E-05 1.52E-05 6.34E-06 3.21E-06 6.49E-07 3.25E-07]; % y-Right axis y2 = [349.43 348.33 347.92 343.61 341.7 340.95 340.51 339.3 338.58 337.92 337.86]; % y-left axis y3 = [382.87 377.51 374.07 367.23 364.92 363.76 363.11 361.77 360.48 356.94 356.33]; % y-left axis y4 = [334.14 329.52 327.79 327.13 327.79 328.31 3...

Any way to change ARP retry count and interval in Windows XP?
Hi, I have an application that is sending a UDP message very infrequently (about once per 30 minutes) to an embedded device on the network. That interval is more than the ARP timeout. There is a strange bug in some switches that sometimes causes a broadcast frame (destination MAC = FF-FF-FF-FF-FF-FF) to be dropped. This unfortunately also happens with the ARP requests. I really expected Windows XP to retry a failed ARP a few times (e.g. 5) with a small interval (e.g. 1..2 seconds) before giving up. What I see in Wireshark is that the PC just sends out one ARP, and the application ...

parallel matlab
Hi all, I'm going to work on a project involving a parallel version of MATLAB - I'm aware of various efforts like MATLAB-*P and so on Right now I need to read up on some material regarding MATLAB internals eg: How are the ATLAS(or is it BLAS) routines called in MATLAB? How does MATLAB's C code store information in memory, cache'ing etc? How is one to get at those? Do you know of any suitable reference(s)/resource(s)? Thank you very much, Aravind ...