Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

Matlab >>Dimensions of matrices being concatenated are not consistent

Date: 2022-12-22 12:23:59

I have angle information: 

 

for i=1:10 angles = func1(val); polar([angles 0]*pi/180,[15 0],'r'); end

angles is 512x1 matrix but matlab give error on polar() function,like

Error using horzcat Dimensions of matrices being concatenated are not consistent.

How to solve this problem? pls help me guys 

Answers: 

If angles is a column vector as you say (512x1), you can't concatenate a 0 to the right. You should concatenate below: replace [angles 0] by [angles; 0].

Another possible mistake is that the two vector arguments of polar should have the same size, and in your case they don't. 

 


Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com