At the Octave command line, typinghelpfollowed by a function name displays documentation for a built-in function. For example,help plotwill bring up help information for plotting. Further documentation can be found at the Octavedocumentation pages. MATLAB Resources At the MATLAB command line, typing...
plot(t, y1); % plots function y1 with the help of thold on; % allows you to print 2 graphs togethery2 = cos(2 * pi * 4 * t); plot(t, y2) % plots function y2 with the help of t 1. 2. 3. 4. Labelthe axis of a plot 标记图的轴 xlabel('time') % names the x-axis...
r + + – g b s y d k v p h replot grid octave:## grid on 2 5.2 Multiple graphs plot x y octave:##plot(angles,ycangles,cos(angles)); octave:##legend(Sine,Cosine); legend 3 plot hold plot octave:13 plot(angles,y,.) octave:14 hold on octave:15 plot(angles,cos(angles),g...
5.2 Multiple graphs 一幅图上可以画多条曲线。通过在 plot 命令中按照次序给出每条曲线的 x 和 y 向量。例如,在之前的正弦曲线的基础之上画出余弦曲线: octave:##plot(angles,ycangles,cos(angles)); octave:##legend(Sine,Cosine); 而 legend 命令为该图片添加相应的图例。该图片的结果如图 3 所示。到...
This ‘hold on’ allows you to print two graphs together y2 = cos(2*pi*4*t); plot(t, y2); xlabel('time') ylabel('value') legend('sin', 'cos') title('my plot') rint -dpng 'myPlot.png' Save file close Get rid of figure figure(1); plot(t, y1) figure(2); plot...
r + + – g b s y d k v p h replot grid octave:## grid on 2 5.2 Multiple graphs plot x y octave:##plot(angles,ycangles,cos(angles)); octave:##legend(Sine,Cosine); legend 3 plot hold plot octave:13 plot(angles,y,.) octave:14 hold on octave:15 plot(angles,cos(angles),g...
5.2Multiplegraphs...16 5.3Multiplefigures...16 5.4保存和打印图片...18 6Octave编程I:脚本文件18 6.1Path问题...18 6.2创建和编辑脚本... .
plot(x,y,'rx','MakerSize',10); ylabel('Profit in $10,000s'); xlabel('Population of City in 10,000s'); 现在我们得到图像如图所示,就是原始的数据的直观表示。 STEP2 GRADIENT DESCENT 现在,我们通过梯度下降法对参数θ进行线性回归。 依照我们之前所得出步骤方法 ...
Browse Library Advanced SearchSign InStart Free Trial
plot(x,y,'rx','MakerSize',10); ylabel('Profit in $10,000s'); xlabel('Population of City in 10,000s'); 现在我们得到图像如图所示,就是原始的数据的直观表示。 Step2 Gradient Descent 现在,我们通过梯度下降法对参数θ进行线性回归。 依照我们之前所得出步骤方法 ...