运行一下你就明白了。望采纳
>>x = linspace(0,10)
>> y1 = sin(x)
>> y2 = sin(2*x)
>> y3 = sin(4*x)
>> y4 = sin(8*x)
>> figure
>> subplot(2,2,1)
>> plot(x,y1)
>> title('Subplot 1: sin(x)')
>> xlabel('x'),ylabel('y1')
>> subplot(2,2,2)
>> plot(x,y2)
>> title('Subplot 2: sin(2x)')
>>xlabel('x'),ylabel('y2')
>> subplot(2,2,3)
>> plot(x,y3)
>> title('Subplot 3: sin(4x)')
>>xlabel('x'),ylabel('y3')
>> subplot(2,2,4)
>> plot(x,y4)
>> title('Subplot 4: sin(8x)')
>>xlabel('x'),ylabel('y4')
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)