Error using InputOutputModel/subsref (line 43) Subscript no. 2 is out of range.
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Im trying to use the tf(),
I created the code weeks ago and no error appeared, when i open the document now its keeps showing
Subscript no. 2 is out of range.
beside each tf().
I am unsure why.
%(d)
R=230
L=47e-6
C=10e-9
LC=L*C
CR=C*R
G=tf(1,[LC,CR,1]);
0 Kommentare
Antworten (1)
Vatsal
am 14 Mai 2024
Hi,
after examining the provided code , it appears to be functioning correctly. The error message “Subscript no. 2 is out of range” typically signifies an attempt to access an element of an array or matrix beyond its bounds. In the context of the provided MATLAB code, this issue seems to be associated with the "tf()" function. A potential cause for this error might be a naming conflict with a variable called "tf" in your workspace, which MATLAB could be mistaking for the "tf()" function. To verify if this is the case, you can use the "whos" command in MATLAB to list all variables currently in your workspace. If you find a variable named "tf", consider removing it by executing the command "clear tf".
I hope this helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!