Thanks very much to P4t for the replied ... i know the command
x=importdata('hey.txt');
can display the content of hey.txt on the command window.. but i want the number of characters inside the file hey.txt store into the variable x so that i can use the variable x to do some other task, do u...
I have a text file and i would like to read its content into a vector x in my m file, i looked at help section in Matlab and tried many function but it still doesnt work, does anyone know how to do it .. e.g
content of my text file is and its in the directory C:\work\work.txt
A former senior...
I am a new user in matlab . just wonder if anyone know how to use matrix in matlab to do the following
i got 12 and wish to turn it into 1122
34 1122
3344
3344
like the following .. i dont...
x =' hskd';
X = sort(x);
[U I J] = unique(X);
N = diff([0 I]);
bar(N)
set(gca,'XtickLabel',U.')
[num2str(N.') U.']
the code above will allow me to sort out the frequency of the charcher
appear in x .
e.g the result is 1h 1s 1k 1d
now i want to import a text file from the directory...
I have written a M file which allows me to sort the frequencies with which each symbol appears in x,
from most frequent to least frequent... but i would like to sort frequecy of appearence of the english letter (a-z)inside x ...
e.g.
x =[A,A,B,C,]
so the result i want to get on the screen is...
does anyone have the source code for arithmetic coding, lossless data compression in matlab or know the links which i can download it ... i am currently looking for those source code for my project...
many thanks