how to solve error using horzcat dimensions of array being concatenated are not consistent
Ältere Kommentare anzeigen
% 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?
Antworten (2)
KSSV
am 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)')
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!