Concatenation of three-dimensional arrays

27 views (last 30 days)
Richard Wood
Richard Wood on 28 Feb 2020
Edited: Stephen on 2 Mar 2020
Hello everyone,
I am trying to concatenate two three-dimensional arrays inside of a double for loop:
for i=1:length(Temperature_max)
for j=1:length(Hy1_values)
Hy1(:,j,i)=ones(length(time_first_interval),1).*Hy1_values(j); % A/m
Hy2(:,j,i)=zeros(length(time_second_interval),1); % A/m
Hy(:,j,i)=vertcat(Hy1(:,j,i),Hy2(:,j,i));
end
end
Obviously vertcat does not work. Any suggestion?
  6 Comments
Guillaume
Guillaume on 2 Mar 2020
Note that these are equivalent:
and
vertcat(A, B)

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by