I am programming a task with force perturbations, and I'm modeling it off the demo on the website. When building, it throws an error saying 'Size mismatch (size [1x1] ~= size [1x4]). The size to the left is the size of the left-hand side of the assignment. Function 'KINARM_EP_Apply_Loads/Force_Cap' (#443.70.71), line 4, column 1: "y"'. I was able to make this work by breaking the link and changing the line to y=zeros(size(u)), but I find it strange that the original doesn't work. I also tried building the downloaded demo on my machine for a sanity check, and the same error message appeared. I'm wondering if you can reproduce the issue on your end, and if there's a better solution. Thanks.
Hi Xin Li, The block should work and shouldn't be unlinked - it is the block that creates the torque commands to the robots. Are you inputting a 1x4 vector into the block? Cheers, Koloman
Hi Xin, I'm able to rebuild the task here. I'm not sure how y wouldn't be size 1x4. Things I would suggest -restart MATLAB -clean out the intermediary build files (everything but the model file and the .dtp files) -reinstall the TDK Cheers, Koloman
Hi Koloman, I believe I am inputting a 1x4 vector into the block, which is the u variable in the KINARM_EP_Apply_Loads/Force_Cap. The error message is referring to line 4 of the Force_Cap function, which says y=u. It is reporting that y is 1x1, where as u is 1x4, causing a dimension mismatch. The error message appears when the link is not broken, and the program would't build. I also could not build the demo - same error message.
Please login or Register to submit your answer