how to solve error using horzcat dimensions of array being concatenated are not consistent
Show older comments
% running function_simulasi
clear
clc
x0 = 0.02; %g/L
tspan = (0:2:80);
[t, x]=ode23('function_simulasi',tspan,x0);
j= 1;
for i = 0:1:80
y(j)= [i, x];
plot(y(:),'r.'); drawnow
j=j+1;
end
title('Konsenterasi Biomassa terhadap waktu')
xlabel('Waktu reaksi (jam)')
ylabel('Konsenterasi (g/L)')
the problem that is in the line : y(j)= [i, x];
can anyone explain?
Answers (2)
KSSV
on 25 Nov 2022
% running function_simulasi
clear
clc
x0 = 0.02; %g/L
tspan = (0:2:80);
[t, x]=ode23('function_simulasi',tspan,x0);
plot(t,x(:,1))
title('Konsenterasi Biomassa terhadap waktu')
xlabel('Waktu reaksi (jam)')
ylabel('Konsenterasi (g/L)')
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!