Unable to use a value of type tf as an index. How to fix?
Show older comments
num=[(-number1),(number2)];
den=[(number3), (number4))];
sys1 = tf(num, den);
fb = bandwidth(sys1)
Having issues when running this saying that I am unavailable to use value of TF as an index. Any suggestions to fix this?
Accepted Answer
More Answers (1)
Ayush
on 3 Jan 2024
Hi @Rohan Gulur
The error message "Unable to use a value of type tf as an index" suggests that there is a syntax error in the code. It seems like there is an extra parenthesis in the den array definition which is causing the problem.
You can try this code:
number1 = ...; % Your value for number1
number2 = ...; % Your value for number2
number3 = ...; % Your value for number3
number4 = ...; % Your value for number4
num = [-number1, number2];
den = [number3, number4];
sys1 = tf(num, den);
fb = bandwidth(sys1);
Thanks,
Ayush
1 Comment
Rohan Gulur
on 3 Jan 2024
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!