Since you already know the method that is similar to the one posted by Dr. Harald Kirchsteiger, then you can easily construct the Observer in Simulink using the basic blocks.
If you want to learn how to use the MATLAB Function block, posting your question appropriately at the MATLAB Answers community may get a better response rate, technically.