~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to examples/syntax/highlight.m

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%%=====================================================
2
 
% MATLAB test code for Kate/Kwrite syntax highlighting
3
 
% kate: hl Matlab
4
 
%%=====================================================
5
 
 
6
 
% Numbers _____________________________________________
7
 
5, 5.5, .1, 0.1, 0.4e5, 1.2e-5, 5i, 5.3i, 6j, .345+3i
8
 
5', 5.5', .1', 0.1', 0.4e5', 1.2e-5', 5i', 5.3i', 6j', .345+3i'
9
 
 
10
 
% Operators ___________________________________________
11
 
% relational operators
12
 
'asdf'~=4, c<=4, d>=4, a<b, a>b, a==b, b||c, b&&c
13
 
% elementwise arithmetic operators
14
 
a.^b, a.*b a./b, 1:4:5
15
 
% single-character binary arithmetic
16
 
a+3, a-3, a*2, a^3, a/3, a\3, a|b, a&b
17
 
% unary operators
18
 
a = ~g; g = @sfdgdsf(sdfsd,345); g.' + 1i.' - ('asdf').'
19
 
% separators and delimiter
20
 
(asd),[sadf];{asdf},;;,;;;()
21
 
% continuation
22
 
a = 1+ ...
23
 
  2;
24
 
 
25
 
% Strings and adjoint _________________________________
26
 
% incomplete strings
27
 
'string
28
 
'str''
29
 
'str''ing
30
 
% complete strings
31
 
'string' % simple string
32
 
'''' % string containing '
33
 
'str''ing' % one string containing '
34
 
'string' 'string'  % two strings
35
 
'asdf'  'asdf''' variable  % two strings and a variable
36
 
'asdf''asdf''   fsgdfg' + (asdf)' - 'asdf'.' + []''''.';''
37
 
'sadf'.' % string transpose
38
 
% adjoint
39
 
{'asdf'}' + 1
40
 
('asdf')' + 1
41
 
['asdf']' + 1
42
 
'' var''' % empty string, var with >1 adjoints
43
 
[5]'*{5}'*('asd')'.'+(5)'*6'*asdf'*asdf'.'  % many adjoints
44
 
A'*B + 1      % adjoint
45
 
A.'*B + 1     % transpose
46
 
A.'.'*B + 1   % double transpose
47
 
A'.' + 1      % adjoint, then transpose
48
 
A.''          % transpose, then adjoint
49
 
 
50
 
% System command ______________________________________
51
 
!hostname
52
 
!cp * /tmp
53
 
 
54
 
% Reserved keywords ___________________________________
55
 
function, persistent, global
56
 
switch, case, otherwise
57
 
if, else, elseif
58
 
try, catch
59
 
for, while, break, continue
60
 
end, return
61
 
function, FUNCTION, Function  % case sensitive!
 
 
b'\\ No newline at end of file'