Error using InputOutputModel/subsref (line 43) Subscript no. 2 is out of range.
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Vatsal
2024 年 5 月 14 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!