Close all;
Clear all;
CLC;
Some operations of%-percent integer data
a=round (3.4);% rounded
to b=fix (-1.9);% to the decimal part
C=floor (3.4);% less than the number and the nearest number
D=ceil (-1.9); A number greater than the number and e=123 from its nearest
;
F=single (e);% conversion to a single precision percent
string of some operations
s1= ' Muahdahd ';
S2= ' SAHFGLAHDFL ';
S3=strcat (s1,s2);% string horizontal connection
s4=strvcat (s1,s2);% string longitudinal connection
s5=upper (S1);% all letters converted to uppercase
S6=S1 (4:7);% Takes the string of a certain interval
[M,n]=size (S1);% returns the string size% percent
logical operator
A=eye (3);% generates diagonal array
b=true (4);% generating logical true matrix%%
function handle, Some privatization functions can be used to
fhandle= @sin;
Y1=fhandle (2*PI);
Y2=functions (fhandle);
%-percent
cell array Stu=cell (2);%2*2 cells array
stu{1,1}={' fjahf ', ' Ahdkah ', ' Hsdahl '};
stu{1,2}={' 12631 ', ' 424 '};
stu{2,1}={' f ', ' m '};
STU{2,2}={20,19};
stu{1,1} (1);% gets the first element of the first cell
stu1=cellfun (' length ', stu);% executes the specified function for each cell
Cellplot (stu);
% percent Structure student=struct (' name ', {' A ', ' B '}, ' age ', {11,22}, ' score ', {rand (3) *10,rand (3) *10});% Create a 1x2 structure, The dimensions of the data require the same
student (2). Name;
Student (2). Score (1,:);% accesses the first row of data in the score field of the second element of the array