<P >用<FONT face="Times New Roman">MATLAB</FONT>语言实现下面的分段函数:<p></p></P>
<P ><FONT face="Times New Roman">y=f(x)= h</FONT>,<FONT face="Times New Roman">x</FONT>><FONT face="Times New Roman">D<p></p></FONT></P>
<P ><FONT face="Times New Roman"> h/Dx</FONT>,<FONT face="Times New Roman">|X|</FONT>≤<FONT face="Times New Roman">D<p></p></FONT></P>
<P ><FONT face="Times New Roman"> -h</FONT>,<FONT face="Times New Roman">x</FONT><<FONT face="Times New Roman">-D<BR></FONT></P>
<P><BR>谢谢哪位帮助下我,这个题对我一个刚学了1星期的新手来说,有点困难了,呵呵</P>[em01]
如果D,h未给出<BR>function y=f(x,D,h)<BR>if <FONT face="Times New Roman">x</FONT>><FONT face="Times New Roman">D <BR> y=h;<BR></FONT><FONT face="Times New Roman">elseif x<-D<BR> y=-h;<BR></FONT><FONT face="Times New Roman">else<BR> y=h/D*x<BR>end<BR><BR></FONT>