<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<pre wrap="">Hallo,
Given the string vector
M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers.
E. g.
Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul']
should be converted to
Mn=[12,4;2,12;6,7].
Ho can that be done in a vectorial style?
Backward (given Mn) it is easier to me:
<span style="color:rgb(0,0,0);">Ms</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">matrix</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">M</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">Mn</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(50,185,185);">size</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">Mn</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span>
Regards
Jens
</pre>
</body>
</html>