>> format short eC=1;O=0;y=3;m=1;w=50;t=0:1:10;f=C.*exp(-(y.*t)/(2.*m))*cos(w.*t+O);disp([t,f])Error using * Inner matrix dimensions must agree.
MATLAB: Error using * in a simple matlab program
*dimensionserrormultiplication
*dimensionserrormultiplication
>> format short eC=1;O=0;y=3;m=1;w=50;t=0:1:10;f=C.*exp(-(y.*t)/(2.*m))*cos(w.*t+O);disp([t,f])Error using * Inner matrix dimensions must agree.
Best Answer