How to overcome this error?

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

Respuestas (2)

Matt J
Matt J el 13 de Oct. de 2020

0 votos

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

1 comentario

madhan ravi
madhan ravi el 13 de Oct. de 2020
RHOar = [RHOar.'; zeros(size(RHOar.'))];
Sudhakar Shinde
Sudhakar Shinde el 13 de Oct. de 2020

0 votos

%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 comentario

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

La pregunta está cerrada.

Etiquetas

Preguntada:

el 13 de Oct. de 2020

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by