function [sys,x0,str,ts] --> Undefined function or variable 't'

Hi guys. I am new to matlab and encountering the error when I run this function file. Could you help me figure it out. Thanks a lot!

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 19 Mär. 2021

0 Stimmen

The code of the body of the function does not matter at this point.
The problem is that in the workspace you are making the initial call from, t is not defined, and therefore it cannot be passed down to the function. The function itself is not being invoked: you are not getting that far because you have not assigned anything to t.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2013b

Community Treasure Hunt

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

Start Hunting!

Translated by