Inconsistent dimensions of arrays
Show older comments
Hi. I am trying to add the Park Transformation matrix to my m file but it won't run. The error message reads:
>> Park_Transformation_matrix
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in Park_Transformation_matrix (line 4)
Park_1 = [cos(theta) cos(theta-(2*pi/3)) cos(theta+(2*pi/3));
My code is simply the matrix itself:
theta=0:0.01:2*pi;
Park_1 = (2/3)*[cos(theta) cos(theta-(2*pi/3)) cos(theta+(2*pi/3));
-sin(theta) -sin(theta-(2*pi/3)) -sin(theta+(2*pi/3));
0.5 0.5 0.5];

Accepted Answer
More Answers (1)
Walter Roberson
on 6 Apr 2023
0 votes
Your theta is on the order of 625 elements long. What size are you expecting sin(theta) to be? What size are you expecting 0.5 0.5 0.5 to be?
Categories
Find more on Operators and Elementary Operations 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!