COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Re: Dataset transform #3

• Email
• Follow

```On 10/6/06, Raj G <rajasekhargo@yahoo.com> wrote:
........
If there is any other solution, that is also welcome (like
multidimensional arrays?).
....................

Raj,

Your data shows that variables, date and num1-num3, forms a 3 by 3 matrix
and that you want these 9 elements be presented as columns in the required
Output. I giving a restricted solution using  array but  can be generalized
if you work on it further.

Muthia Kachirayan

data a;
input id \$ char1. date n1 n2 n3;
cards;
A   1     3      5      4
B   1     8      3      2
C   1     2      6      7
A   2     4      8      9
B   2     9      0      1
C   2     0      2      3
A   3     2      3      4
B   3     8      6      7
C   3     6      4      5
;
run;

proc sort data = a;
by id;
run;

data b(drop=date p n1-n3);

array k[3,3] _temporary_;

do until(last.id);
set a;
by id;
p + 1;
k[1,p] = n1;
k[2,p] = n2;
k[3,p] = n3;

end;

n1_1 = k[1,1];
n1_2 = k[1,2];
n1_3 = k[1,3];
n2_1 = k[2,1];
n2_2 = k[2,2];
n2_3 = k[2,3];
n3_1 = k[3,1];
n3_2 = k[3,2];
n3_3 = k[3,3];
output;

p = 0;

run;
proc print data = b;
run;
```
 0
Reply muthia.kachirayan (702) 10/6/2006 7:02:51 PM

See related articles to this posting

0 Replies
44 Views

Similar Articles

12/10/2013 2:14:05 PM
[PageSpeed]

Similar Artilces:

XSL Transform trouble (XML newbie)
Hello all - I am trying to display some XML data as html via a transform (XSLT). The XML data is as follows: <TopElement> <NextElement> <String1>AAAAA</String1> <String2>BBBBB</String2> <String3>CCCCC</String3> <String4>DDDDD</String4> </NextElement> </TopElement> There could be a great many <NextElement> nodes in the XML file. I want the resultant file (structure) to look like this: .... <stuff> <tr><td> <xsl:value-of select="String2"> <... have looked for a solution i the book I'm using (XSLT & XPATH) but no straightforward answer. Please let me know if I have not stated the problem correctly. Thank you in advance for any assistance. Regards, chris chris wrote: > Hello all - > > I am trying to display some XML data as html via a transform (XSLT). > The XML data is as follows: > > <TopElement> > <NextElement> > <String1>AAAAA</String1> > <String2>BBBBB</String2> > <String3>CCCCC</String3> > <String4>

wavelet transform--line frequency--image
Hi everyone, I need to find simple line frequency in an image using wavelet transformation and also the location of the two particular frequencies in that image. Can anybody please tell me or atleast give me an idea on how i can do that? Here is the link for the image: http://www.mediafire.com/imageview.php?quickkey=x4c9ayslxtxd8sl&thumb=4 I have already gone through the theories of the wavelet transformation (like the multiresolution decomposition theorem and others).....since wavelet transform is supposed to give the spatial frequencies and as well as the locations...;thumb=4 > > I have already gone through the theories of the wavelet transformation (like the multiresolution decomposition theorem and others).....since wavelet transform is supposed to give the spatial frequencies and as well as the locations of that particular spatial frequency, is this problem do-able with the 'wavelet processing toolbox' of matlab? > > Besides, lets say I have noise in the other areas of that image and I would like to zero-in on my areas of interest (as regions of interest).....can i choose these particular regions of interest in my image using wavelet

Fw: data transform question -again
Sorry, but here is one more wrinkle. I have: NAME DIV QUARTER VAL1 VAL2 A 01 2007Q1 7 210 A 01 2007Q2 8 100 A 03 2007Q4 4 60 A 06 2007Q3 12 15 B 02 2007Q2 8 17 B 05 2007Q3 70 100 B 06 2007Q4 80 60 C 08 2007Q2 5 45 C 04 2007Q4 15 46 .. .. .. .. I want: NAME DIV VAL12007Q1 VAL2Y2007Q1 VAL12007Q2 VAL2Y2

Transform XML to XML using XSLT
hello all, seems like a simple issue, but having tried several approaches with no success I am posting this question, I have a XML in one format, I want to now convert into another XML format using XSLT. FirstType.XML: (In this XML the States sub elements appear within USA element) ------------------------------------------------ <?xml version="1.0" encoding="utf-8"?> <ROOT> <Country> <USA> <State> <City1>6000</City1> <City2>100</City2> <City3> </City3> </State> &l

Fourier Transform Question for Pulsed CW and 802.11b DSSS
Hi, It's well known in the radio frequency community that the Fourier Transform of a pulsed CW signal is the (sinx)/x function, aka as the sinc function, with the spacing of the frequencies being equal to the pulse repetition interval, and the spacing of the lobes being equal to the inverse of the pulse itself. However, i've never seen a full mathematical derivation of this done, and i'm wondering if anyone has a link to a proof. I'd also like to see this done for an 802.11 DSSS, which will surely be dependant on the chipping rate of your Barker sequence, etc. Thanks in advance. Slick <radio913@aol.com> wrote in message news:1130728404.285497.57360@g49g2000cwa.googlegroups.com... > Hi, > > It's well known in the radio frequency community > that the Fourier Transform of a pulsed CW signal > is the (sinx)/x function, aka as the sinc function, > with the spacing of the frequencies being equal > to the pulse repetition interval, and the spacing > of the lobes being equal to the inverse of the > pulse itself. > > However, i've never seen a full mathematical > derivation of this done

z-transform of sine wave, Bode plot
Hi, I try to visualize a sine wave, z-transformed in a Bode plot. The frequency shows up correctly, but the amplitude is way off - why? Thanks for your comments. Bmalp function zdemo format compact syms w Ts n z phi t Ts = 1 w = 0.1 phi = 0 vz = simplify(ztrans(sin(w*n*Ts+phi))) % correct if 0 % method 1 [num,den] = numden(simplify(vz)); num = collect(num,'z') den = collect(den,'z') num1 = sym2poly(num) den1 = sym2poly(den) [h,w] = freqz(num1,den1,512,'whole'); else % method 2 fs = 1; f = linspace(0,fs,256); w = 2*pi*f;

Re: How to back transform a standard error ? #5 1561330