ERROR : "Undefined function or variable 'ts'". While running the program

23 views (last 30 days)
Error evaluating parameter 'SampleTime' in 'twentyfourpulse/VCIMD/Unit Delay4': Undefined function or variable 'ts'.
PLease help me out,my project date is soon approaching

Answers (3)

Kaustubha Govind
Kaustubha Govind on 9 Jul 2012
Your model has a block sample time set to the variable 'ts', which needs to exist in the workspace. You can create this variable and assign it a reasonable value in the base workspace. Alternatively, if you're not sure what the value should be, you can double-click on the block 'twentyfourpulse/VCIMD/Unit Delay4' and change the sample time from ts to -1.

Image Analyst
Image Analyst on 7 Jul 2012
This page will help you immensely: http://www.mathworks.com/help/techdoc/matlab_prog/f10-60570.html It tells you how you can debug your program, like how to set a breakpoint and examine variables at that point in your code. You will see that when it comes time to use ts, that ts doesn't yet exist - it has no value and doesn't even exist.

Farah Riaz
Farah Riaz on 2 Jun 2021
what value should i assigned to sample time with this error?
nvalid setting in 'dc/Active Rectifier/Detailed/Bus controller/Unit Delay4' for parameter 'SampleTime'.
Caused by:
Error evaluating parameter 'SampleTime' in 'dc/Active Rectifier/Detailed/Bus controller/Unit Delay4'
Undefined function or variable 'Ts'.
Component: Simulink | Categ

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!