Mass-spring-Damper system with external signal

10 views (last 30 days)
I am trying to simulate a mass-spring-damper system with a signal from my workspace thou it gives me this error. Please help.
Error in port widths or dimensions. Invalid dimension has been specified for input port 2 of 'sensitivity/Sum1'.
Error in port widths or dimensionsError in port widths or dimensions. Output port 1 of 'sensitivity/Sum' has 26 elements. This port does not accept the dimensions (or orientation) specified by the output signal.
Below is my block arrangeme

Answers (1)

Fangjun Jiang
Fangjun Jiang on 5 Feb 2019
Assume your data has 700 data points, you need to make your y a 700x2 matrix.
The first column is the time step, the second column is the data. For example
y=[0.01*(1:700);ones(1,700)].';

Community Treasure Hunt

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

Start Hunting!