My Project
 All Files Functions Variables
example.m
Go to the documentation of this file.
1 %> this is the modell of a function with comments behind of the commands
2 %> @param Parameter parameter of the function
3 %> @return a return-value
4 
5 function [ ReturnValue ] = m_function(Parameter)
6 
7  LokalVariable_1 = Value1; %variable-comment 1
8  LokalVariable_N = ValueN; %variable-comment N
9 
10  operation_1(LokalVariable_1, Parameter); %operation-comment 1
11  LokalVariable_2 = operation_2(LokalVariable_N);
12  %operation-comment 2
13 
14  if(LokalVariable_1 == LokalVariable_2) %statement-comment for true
15  ReturnValue = DefaultValue(); %operation-comment for true
16  else %statement-comment for false
17  while(ParameterStatment == 1) %loop-comment
18  ReturnValue = operation_3(); %operation-comment 3
19  end
20  end
21  return; %comment return-line
22 end