clear all;k=10e6;cmin=10e-9;cmax=10e-6;c0=100e-9;v=1;for t=1:6 C(t)=c0-sqrt(1+(2*c0^2*k*(1/cmin-1/cmax)*v*t));endplot(t,C,'r');
MATLAB: In this program i want to assign C(0)=c0 and i need to plot values of C(t) from t=0 to 6. Also i need to plot the values of C(t) for v=1,5,-1,-5. I got an error as Attempted to access c(0)index must be a positive integer or logical. anyone help me
attempted to access c(0); index must be a positive integer or logical.
Best Answer