= -ad, y(i) = m*(t(i) + ad); end end function y = ustep(t,ad) % generation of unit step % t: time % ad : advance (positive), delay (negative) % USE y = ustep(t,ad) N = length(t); y = zeros(1,N); for i = 1:N, if t(i)> = -ad, y(i) = 1; end end I get this error Conversion to logical from sym is not possible. Error in ramp (line 10) if t(i)>=-ad; Error in Expriments (line 20) RMP(t)=ramp(t,j,x); In general, I am trying to get output as u(t)+r(t) (ramp + step function) and I am stuck at this point.
double c=input('Enter piecewise initial value:');
That means the same thing to MATLAB as
double( 'c=input(''Enter piecewise initial value:'')') ;
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Explore similar technical troubleshooting questions and verified MATLAB solutions: