How do I add the rainbow colour bar in so that the colour changes according to the value of 'Gr' (eg: 1-red, 2-orange and so on)

4 次查看(过去 30 天)
%this is when growth rate is affecting the size of the cell clear all; %Np = [10, 20 ,30 ,40 ,50 ,60 70 ;80 ;90 ;100; D = 0.001; Ao = 100e-6; x= 0.5e-6; s= 6e-6; r=19.3e-6; l=0.5; dd=0.25e-6 k=19.1e-6; Np=10 i=1; c = ['r','y','g','c','b','m','k'];
% for kk=0.0001:0.0001:0.0003 for Gr=1:1:10
s=Gr*(pi*(dd^2+x)) % D=kk
[t,y]= ode23(@(t,y)passiveinoutwithnumberofpumps(t,y,Np, D, Ao, x, s),[0 10],0,[Np, D, Ao, x, s]); plot (t,y,'color',c(Gr),'marker', 'o')
xlabel ('antibiotic treatment time ')
ylabel ('internal antibiotic')
title ('Passivein-out (Surface area changes depending on growth rate)')
% rgbplot(parula) % colormap(parula) colorbar('Ticks',[])
hold on
% % for l=1:10 % for j=1:length(t) % % Sv(j,l) =(r+(l*100/k))/(Np*(D*((Ao-y(j))/x)*s)*t(j)); % % end % end % % % % for k2=1:length(t) % % % % % % plot(t(k2,1),Sv(k2,i),'o') % % % xlabel ('antibiotic treatment time (h)') % % % ylabel ('survivability (%)') % % % title ('survivability of persisters at different antibiotic treatment time') % % % hold on % % % end % % % % for k2=1:length(t) % % plot(t(:,1),Sv(:,i)) % xlabel ('antibiotic treatment time (h)') % ylabel ('survivability (%)') % title ('passive in - out (growth rate dependent)') % hold on
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by