In: Computer Science
Write the line x = 0:2:20; in the Command Window of MATLAB and then create a Simulink model that first loads x from the Workspace, then creates a vector y such that y = 2.5x + ex , and finally sends the vector y back to the Workspace. You will need a From Workspace block, a To Workspace block, two Constant blocks, a Product block, and a Sum block. Note that there is a sample time associated with the From Workspace block; set it and the simulation time such that x is only sampled once.
Model in simulink:
Which block is what?
Block properties of simin and simout:
In matlab command window:
In matlab workspace after running the simulink model:
Hope this helps.