- Starting Matlab R2018b
- Starting Simulink from Matlab
- Choosing Simulink Onramp
- Choosing training 7.2 Matlab Function Block
- Clicking Next twice on the instructions to get to the Simulink training editor for 7.2
- Double clicking the predefined Matlab function block to get to the code editor for the block
- It contains predefined code:
function power = fcn(deltaH)
Cp = 0.35; % Power coefficient
rho = 1000; % Density of water, kg/m^3
A = pi*10^2; % Area of turbine blade
g = 9.81; % Acceleration of gravity, m/s^2
% Replace the equation below with the correct equation for power
power = deltaH;
- Modifying the last statement to
power = 0.5*Cp*rho*A*(2*g*abs(deltaH))^(3/2);
- Saving the file
- Connection the Matlab function block to the Siglnal Assesment
- Clicking Submit
Doing this opens the Diagnostics viewer with the following message:
Undefined function 'fixed.internal.clearLog' for input arguments of type 'char'.
After that I tried to work around the problem and see what could be the issue.
Simple code in the predefined function - same error
A new matlab function block with the same code as the predefined (written, not copied) - same error
A regular function block doing a square of the signal - works, no error - but does not solve the task.
My conclusion is that there is someting going on with the Matlab function block in this task. If it is due to me using R2018b or someting within the training setup, I have no clue. All other training steps in the Simulink Onramp worked like a charm. Also the Matlab Onramp and Deep Learning Onramp are fine.