测试jupyter notebook导出md格式的兼容性
这部分是python的输出
for x in range(5) :
print(x)
0
1
2
3
4
from sklearn import tree
feature = [[178,1],[155,0],[177,0],[165,0],[169,1],[160,0],[153,1]]
label = ['male','female','male','female','male','female','male']
clf = tree.DecisionTreeClassifier()
clf = clf.fit(feature, label)
a=clf.predict([[167,0]])
print(a)
b=clf.predict([[152,1]])
print(b)
['female']
['male']
c=clf.predict([[152,0]])
print(c)
['female']
d=clf.predict([[168,0]])
print(d)
['female']
e=clf.predict([[175,0]])
print(e)
['male']
这部分是测试数学公式的输出(LaTeX风格)
$ z = \frac{x}{y} $,
$E = mc^2$
$ \Vert A\Vert_1=\max_{1\le j\le}\sum_{i=1}^m|{a_{ij}}| $
$$ \Vert A\Vert_F=\sqrt{(\sum_{i=1}m\sum_{j=1}n{| a_{ij}|}^2)} $$
这部分是matlab的输出
% % https://jingyan.baidu.com/article/e75aca85007345142edac6ca.html
close all; clear all; clc
n1=1; [x1,y1]=meshgrid(-2*pi:n1:2*pi);
z1=peaks(x1,y1);
n2=1/5*n1;
[x2,y2]=meshgrid(-2*pi:n2:2*pi);
%二维插值
% z2=interp2(x1,y1,z1,x2,y2,'Nearest');
% z2=interp2(x1,y1,z1,x2,y2,'Linear');
z2=interp2(x1,y1,z1,y2,x2,'Spline');
mesh(x1,y1,z1-10);hold on;
mesh(x2,y2,z2+10);hold off;
axis([-6,6,-6,6,-15,15])
xlabel('x','fontsize',20);
ylabel('y','fontsize',20);
zlabel('z','fontsize',20);
1+2
ans =
3
1+3
ans =
4