How to solve Vertcat error to PID graph?
1 次查看(过去 30 天)
显示 更早的评论
I'm trying to run the following code but it sends an error, specifically:
Error using vertcat dimensions of matrices being concatenated are not consistent.
Error in Optimized_response (line 6)
T1 = TF ([25.2 * KD 21.2 * kd + 25.2 * KP 25.2 * ki + 21.2 * KP + 3 * kd 21.2 * ki + 3 * KP
Someone could help me fix it.
The code is:
clc
close all
kd=input('enter the value of kd');
kp=input('enter the value of kp');
ki=input('enter the value of ki');
T1=tf([25.2*kd 21.2*kd+25.2*kp 25.2*ki+21.2*kp+3*kd 21.2*ki+3*kp
3*ki],[1 16.58 25.41+25.2*kd 17.18+21.2*kd+25.2*kp 11.70+25.2*ki+21.2*kp+3*kd 21.2*ki+3*kp+1 3*ki]);
ltiview
0 个评论
回答(1 个)
Stephan
2018-12-18
Hi,
try:
kd=input('enter the value of kd');
kp=input('enter the value of kp');
ki=input('enter the value of ki');
T1=tf([25.2*kd 21.2*kd+25.2*kp 25.2*ki+21.2*kp+3*kd 21.2*ki+3*kp+3*ki],...
[1 16.58 25.41+25.2*kd 17.18+21.2*kd+25.2*kp 11.70+25.2*ki+21.2*kp+3*kd 21.2*ki+3*kp+1 3*ki]);
ltiview
Best regards
Stephan
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!