我已经在大学的MATLAB中编写了一个代码,我被告知缩进很重要,它导致我在8中失去了3分.缩进不仅仅是"风格"吗?
代码如下:
function[pp,pb,pd]=demopoly(fname,N)
%The function reads the data from the file and computes the coefficients of a polynomial of degree N of three polynomials pp, pb, and pd that best fit the population, births and deaths in the data.
%The function returns the three variables pp, pb and pd in this order.
C=csvread(fname);
pp=polyfit(C(:,1),C(:,2),N);
pb=polyfit(C(:,1),C(:,3),N);
pd=polyfit(C(:,1),C(:,4),N);
end
Run Code Online (Sandbox Code Playgroud)
有人能告诉我压痕应该在哪里发生吗?
nomatterssuchaspunctuationandindentationarenotjustmattersofstyletheyareanessentialaidtohumancomprehensionofwrittentextwhetherprosepoetryorcodeicouldgoonbutwont