Skip to main content

Posts

Showing posts from August, 2021

Stretch the dynamic range of the given 8-bit grayscale image using MATL...

Verification with Simulink test

  I am trying out the use of   Simulink   Test and Requirements for MBSE. I have created a requirement that links to a test case and is implemented by a block. After running the test, I see that the test completed sucessfully and that the requirement has a green verfied bar in the requirements manager. All this works well. However, now if I make some changes in my model that is part of the test harness for the test, I would expect that the verfication needs to be done again, and the verification bar should turn yellow. However, I do not see this happening and the requirement remains verified. I wanted to ask: Is my expectation correct? Is there an option that implements this that I am not using correctly? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaran

Why does "setVariable" in Simulink Test not update variables?

  I'm using "setVariable" to update a variable in a test harness. I'm using the command   evalin('base', 'y_coordinate') in a "From Workspace" block to load the variable into Simulink.   However, in R2019b the variable doesn't seem to get updated. Why does this happen? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. In R2019b, the behavior of "setVariable" is modified such that it overrides only model variables (as opposed to MATLAB variables).   I attached a simpler model ("SimpleVars_R2019b.slx") to help illustrate this. This model has two "From Workspace" blocks, one set to "a" and one set

Undefined function 'de' for input arguments of type 'double'.

  Hi,   when I execute the following code, I get the error message: "Undefined function 'de' for input arguments of type 'double'." with the vector "de" is well defined in mdlderivatives of my s-function.   I tried everything and, I still can't solve this problem!   I need your help!!   Thank you.     function [sys,x0,str,ts] = dynamic_model(t,x,u,flag) switch flag, case 0, [sys,x0,str,ts]=mdlInitializeSizes; case 1, sys=mdlDerivatives(t,x,u); case 3, sys=mdlOutputs(t,x,u); case { 2, 4, 9 }, sys = []; otherwise DAStudio.error('Simulink:blocks:unhandledFlag', num2str(flag)); end function [sys,x0,str,ts]=mdlInitializeSizes(~,~,~,~) sizes = simsizes; sizes.NumContStates = 5; sizes.NumDiscStates = 0; sizes.NumOutputs = 18; sizes.NumInputs = 22; sizes.DirFeedthrough = 0; sizes.NumSampleTimes = 1; sys = simsizes(sizes); x0 = [20,0,0,0,0]; str = []; ts = [0 0]; function de=mdlDerivatives

Error "Accelerator mode is not supported through the S-Function API" when calling set_param in Accelerator mode.

  I have a model open in accelerator mode. When I call 'set_param' to change the values of several model parameters, I get the following confusing error:     >> set_param(vdp,'StopTime','100') Accelerator mode is not supported through the S-Function API Why is this? How can I fix this? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. This error message is misleading, but there is a syntax error in the call to 'set_param' used here. The object input argument is supposed to be passed in as a string, character array, or handle to the object being modified.   In this case, passing in vdp (without quotes) is invalid because vdp is not evaluated co

How can I extract Parameter Overrides from a Simulink test file?

  I have a   Simulink   test file (.MLDATX), which I would like to extract Parameter Overrides from (and store in a table, for example).   How can I do this? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Parameter Overrides can be extracted from a test file using functionality from the "sltest.testmanager" package, for example:     % Load an instance of the test file testfile = sltest.testmanager.TestFile('./mytestfile.mldatx', false);   % Extract and loop over test suites testsuites = getTestSuites( testfile );  for suite = testsuites     % Extract and loop over test cases     testcases = getTestCases( suite );     for testcase = testcases         % Extract a

Can I use the same test cases for both a fixed-point and floating-point model in Simulink Test?

  I am doing model-in-loop (normal simulation) and software-in-loop testing on my models (codegen). Previously, I have been working with floating-point models and am now moving to work with fixed-point models. I am interested in knowing how Simulink Test supports signal and parameter scaling for fixed-point models in SIL workflows, and whether I need to provide parameter scaling and offsets for floating-point to fixed-point conversion of model inputs and outputs. I am familiar with using A2L files to do parameter scaling and offsets for fixed-point data conversion when running tests at the test bench with SIL workflows with other test tools. The input stimulus and expected outputs for my tests are pulled from an external Excel file.   When Simulink Test is used to manage test cases with an external Excel file to provide the input stimulus and expected outputs, and to manage parameter override, all signals and parameters are also in engineering units. This works OK with MIL testing sinc

How can I avoid rebuilding my model each time I run a Simulink Test Real-Time test case?

  I am trying to run Real-Time tests using   Simulink   Test and Simulink Real-Time (with Speedgoat hardware).   The issue is that I sometimes wants to run the same test multiple times, but this is taking a very long time to do. I think this is because the model rebuilds (at least partially) and is re-deployed to the hardware each time the test is run. I have verified that the MLDATX file that is deployed to the target computer is rebuilt with each run of the test. However, the source code, MEX files, etc. of the model are NOT rebuilt with each run, so it's not quite a "full" rebuild. I also tried having multiple copies of the same test case within one test suite, and the MLDATX file was still rebuilding for each test case.   Here are reproduction steps: 1) Connect to & configure an SLRT target machine 2) Open the Test Manager and create a real-time Test Case  3) Open the demo model that is tested with the following command: >> sltestProjectorController 4) In th

Is there a way to have both Centos7 and Centos8 running Simulink at the same time?

  While running Simulink through MATLAB R2020a Update 4 on Centos8 we face this error: Caught "std::exception" Exception message is: /lib64/libk5crypto.so.3: undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b: Success: Success Looking around it seems that this is a known issue:   https://www.mathworks.com/matlabcentral/answers/514366-error-while-installing-matlab-r2020a-on-fedora-32   https://bugzilla.redhat.com/show_bug.cgi?id=1829790   The proposed solution unfortunately cant be applied to our environment as we distribute the application via a NFS network share to different OS versions.   If we just remove the bundled libcrypto.so.1.1 from bin/glnxa64/ we have Centos8 running fine but Centos7 systems would break.   Is there a way to fix this in order to have both Centos7 and Centos8 running at the same time ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE,

Why is the 'ExecutionTime' object not created during model simulation in Simulink Test?

  I have a model and a corresponding SIL/PIL test harness in which I have enabled the 'CodeExecutionProfiling' option in the model Configuration Parameters.   If I simulate the test harness normally, the 'ExecutionTime' object is created and stored in the variable 'executionProfile'. However, when I a SIL/PIL equivalence test in Test Manager, the object is not created.   How can I retrieve the 'ExecutionTime' object upon completion of my test case? ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. The 'executionProfile' variable is saved as a property of the 'Simulink.SimulationOutput' object in the test case and can be accessed using

How do I obtain the stability of a MIMO system in Simulink?

  I have a large system that has 77 states in which 11 come from the controller and 66 come from the plant. I add the controller and want to know the best way to get the overall stability of this large system. ANSWER Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. You can use the  Simulink  LTI Viewer to find the stability of the system.   1. In your  Simulink model,  go to Simulink Tools menu and select Linear Analysis, an LTI Viewer and the "Model_Inputs_and_Outputs" library will show up.   2. Add an Input Block and an Output Block at the input and output of the feedback system in your model from the "Model_Inputs_and_Outputs" library.   3. In the LTI Viewer, go to