我是新手,老师给了道题我实在不会了,求助下,谢谢
<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> 如果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> 谢谢啦~~ <P>就是舍</P>
页:
[1]