f



Left or Right Function

Hi all,

Is there in Matlab a function like the LEFT function in
access that allows to define as a new variable the first (or
last) N characters of a string or number? 

thanks

0
9/1/2007 1:24:56 AM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
484 Views

Similar Articles

[PageSpeed] 40

"Cesare " <cesare_fracassi@yahoo.com> wrote in message 
<fbaf18$hu6$1@fred.mathworks.com>...
> Hi all,
> 
> Is there in Matlab a function like the LEFT function in
> access that allows to define as a new variable the first 
(or
> last) N characters of a string or number? 
> 
> thanks
> 

I dont know about access, but try this: if ur variable is 
an String
var='Characters';
N=5
varleft=var(1:N);
varleft='Charac'
varright=var(N:end);
varright='cters'

I hope this helps u.

B
0
bblairet (4)
9/1/2007 1:36:28 AM
Reply: