How to overcome this error?

Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in smoothmod (line 55)
RHOar = [RHOar.'; 0];

답변 (2개)

Matt J
Matt J 2020년 10월 13일

0 개 추천

RHOar is not a row vector, as you seem to expect it to be at line 55.

댓글 수: 1

RHOar = [RHOar.'; zeros(size(RHOar.'))];
Sudhakar Shinde
Sudhakar Shinde 2020년 10월 13일

0 개 추천

%Example:
a=[1 2 3 4]
B= [a;0]
%This throws an eroor as you mentioned
%Correct concatenation
B=[a,0]
%or
B=[a';0]

댓글 수: 1

if this throws error :
RHOar = [RHOar'; 0];
you could try:
RHOar = [RHOar; 0];

이 질문은 마감되었습니다.

질문:

2020년 10월 13일

마감:

2021년 8월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by