| Subject: | vectorize cell array |
|---|---|
| From: | ysjung |
| Date: | Fri, 30 Sep 2005 12:08:34 -0400 |
| Newsgroups: | comp.soft-sys.matlab |
Is there way I can vectoize for loop below? I noticed in cell array
you are limited when it comes to characters.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
strvec = {'Set' 'ASCIIIIIIII' 'textas' 'yuioop'};
for i = 1:length(strvec),
num(i) = length(char(strvec(i)))
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I am kinda looking for length of each character on this array, strvec
= [3 11 6 6];
the above code does the job, but just want to find out if there is
simpler way.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Binary files in matlab, Haytham Mahamda |
|---|---|
| Next by Date: | Re: Binary files in matlab, Titus Edelhofer |
| Previous by Thread: | Binary files in matlab, Haytham Mahamda |
| Next by Thread: | Re: vectorize cell array, Titus Edelhofer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |