Problem with Simulink Onramp Task 7.2

Hi,
During the Simulink Onramp, I've stranded on Task 7.2 with the following issue. All code is correct and checked a few times now. Since I don't know the function that errors or what input is of type char, I'm stuck. I've tested to replace the MATLAB function with the fcn-block and then everything works fine. As soon as I add a MATLAB function block, i get the error - no matter if it is the prepared block from the task or a nex from simulink. It does not matter what code I fill it with, so it feels like there is a missmatch in the communication from Simulink into the block type itself.
Problem on Task 7.2 MATLAB Function Block.JPG

11 comentarios

Srivardhan Gadila
Srivardhan Gadila el 29 de Jul. de 2019
Can you provide the code you have written in the function block provided by the task.
Jonas Jarlmark Näfver
Jonas Jarlmark Näfver el 29 de Jul. de 2019
Not any more, but it was exactly as the solution. The issue was still an issue with 1+1 or with any other code, so it was syntax independant.
Srivardhan Gadila
Srivardhan Gadila el 1 de Ag. de 2019
Are you still getting the error?
Can you also provide the exact steps you did which led to causing the mentioned error.
Sourabh Govekar
Sourabh Govekar el 3 de Jul. de 2020
Editada: Sourabh Govekar el 3 de Jul. de 2020
I also have problem. function block editor is not opening. If I try to open. I am getting following errors.
Warning: Schema generator function did not return a DAStudio.ToolSchema.
Unrecognized function or variable 'ee.internal.contextmenu.menuPowerSystems'.
Error in slCustomizer/customizationMenuPowerSystems>@(cbInfo)(ee.internal.contextmenu.menuPowerSystems('PowerSystems',cbInfo))
Warning: Schema generator function did not return a DAStudio.ToolSchema.
Unrecognized function or variable 'simscape.internal.contextMenu'.
Error in slCustomizer/customizationSimscape>@(cbInfo)(simscape.internal.contextMenu('SimscapeContextMenu',cbInfo))
Warning: Schema generator function did not return a DAStudio.ToolSchema.
Error using feval
Unrecognized function or variable 'sltest.internal.menus.SimulinkTestMenu'.
Warning: Schema generator function did not return a DAStudio.ToolSchema.
Error using feval
Unrecognized function or variable 'sltest.internal.menus.ObserverMenu'.
Warning: Schema generator function did not return a DAStudio.ToolSchema.
Error using feval
Unrecognized function or variable 'sltest.internal.menus.InjectorMenu'.
Warning: Schema generator function did not return a DAStudio.ToolSchema.
Piyush Aphale
Piyush Aphale el 18 de Jul. de 2020
same problem
Aditya Raj Singh Udawat
Aditya Raj Singh Udawat el 15 de Ag. de 2020
same problem
Maria Kotova
Maria Kotova el 15 de Sept. de 2020
same issue
Gowtham K K
Gowtham K K el 15 de Sept. de 2020
same issue
Hussein Ansar Ayoub
Hussein Ansar Ayoub el 30 de Oct. de 2022
Movida: Dyuman Joshi el 7 de Mzo. de 2024
Warning: an error occurred while parsing class mpt.MiscCustomizer:
Undefined function or variable 'ecoderinstalled'.
> In slCustomizer/internalCustomizationSimulink
In slCustomizer/callAllMethods
In slCustomizer/refresh
In slCustomizer.staticRefresh
In sl_refresh_customizations (line 22)
In slcustomize (line 4)
In simulinkrc (line 34)
In start_simulink (line 19)
In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Michael Rodelo
Michael Rodelo el 26 de Mzo. de 2023
Hi, I can't add the ^ command by pressing alt+94, the application links this to a shortcut and not to the typing inside Matlab.
Ayla
Ayla el 7 de Mzo. de 2024
Movida: Dyuman Joshi el 7 de Mzo. de 2024
I could not type *,(),^, and also could not use paste, what can I do...

Iniciar sesión para comentar.

Respuestas (5)

Srivardhan Gadila
Srivardhan Gadila el 5 de Ag. de 2019

1 voto

I have brought this issue to the notice of our developers. They will investigate the matter further.
Faiz Zaidi
Faiz Zaidi el 19 de Sept. de 2020

1 voto

The problem was with incorrect or not enough placements of brackets .
use this code
power = 0.5*Cp*rho*A*(2*g*abs(deltaH))^(3/2);
it will surely work

2 comentarios

Shashi More
Shashi More el 4 de Mayo de 2022
It is helpful to me ...thank you
Rishwanth
Rishwanth el 12 de Feb. de 2024
it does not work

Iniciar sesión para comentar.

Jonas Jarlmark Näfver
Jonas Jarlmark Näfver el 1 de Ag. de 2019

0 votos

  • 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.

1 comentario

I also had this warning on starting Simulink from Matlab:
Warning: an error occurred while parsing class mpt.MiscCustomizer:
Undefined function or variable 'ecoderinstalled'.
> In slCustomizer/internalCustomizationSimulink
In slCustomizer/callAllMethods
In slCustomizer/refresh
In slCustomizer.staticRefresh
In sl_refresh_customizations (line 22)
In slcustomize (line 4)
In simulinkrc (line 34)
In start_simulink (line 19)
In connector.internal.fevalMatlab
In connector.internal.fevalJSON

Iniciar sesión para comentar.

Aaro
Aaro el 5 de Mzo. de 2024

0 votos

The problem can be fixed when you click "A = pi*10^2; % Area of turbine blade" and double the line so you can add other commands power = 0.5*Cp*rho*A*(2*g*abs(deltaH))^(3/2); there.
Erwin Calvin
Erwin Calvin el 4 de Jun. de 2024

0 votos

Why is the signal assessment missing?I tried to restart several times but the problems stay the same.Please help :(

Productos

Preguntada:

el 24 de Jul. de 2019

Respondida:

el 4 de Jun. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by