Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Part or Partition or Split or Extract or ...... ????

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85410] Part or Partition or Split or Extract or ...... ????
  • From: Mayneord <xrayspectrum at googlemail.com>
  • Date: Sat, 9 Feb 2008 04:20:01 -0500 (EST)

Hallo All,

Please have a look at my code. Here I am trying to get only the value
25\55 in the Out[3] and  0\60 in the Out[4] without text and other
intergers and I would like to separate them into different columns
like   25   55  0  60   and similarly I wanted to separate the values
64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\6...
in the Out[5] into one column.


[In]1:=   A = Import["new3.txt", "CSV"];

In[2]:=Length[Import["new3.txt","CSV"]]
Out[2]= 402

In[3]:=  A[[1]]
Out[3]= {(300a,011c) DS [25\55]                               #   6, 2
\            unknownparameter}

In[4]:=  A[[2]]
Out[4]=  {(300a,011c) DS [0\60]                                #   4,
2 \            unknownparameter}

In[5]:=  A[[3]]
Out[5]= {(300a,011c) DS
[64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\64.5\
\64.5\6... # 400,80 unknownparameter}


My goal is to substract 55 from 25 in the Out[3] and 0 from 60.
Finally, extract the 80 values from the Out[5] then subtract
1,2,3....40 value from 41,42,42.....80 value. So my approach was first
to separate them into different columns and do the substraction . I
tried Part or Partition or Split or Extract .and other functions from
the Element Extraction to separate them. But unfortunately I was
unsuccessful at the first step

Please tell me are there any better solutions for this kind of
problems.

Thanks inadvance for your suggestions and  help !!

May




  • Prev by Date: button to load files from a window
  • Next by Date: Re: Bug in the FourierSinCoefficient function
  • Previous by thread: Re: button to load files from a window
  • Next by thread: Re: Part or Partition or Split or Extract or ...... ????