%// input points of an object
Point=[0 0 0;
4.25 0 0;
4.25 0 0.7;
3.1 0 1;
2.2 0 1.5;
0.5 0 1.5;
0 0 1;
0 1.70 0;
4.25 1.70 0;
4.25 1.70 0.7;
3.1 1.7 1;
2.2 1.7 1.5;
0.5 1.7 1.5;
0 1.7 1];
%// Line index of the object
LineIndex= [1 2
2 3
3 4
4 5
5 6
6 7
7 1
2 9
9 10
10 11
11 12
12 13
13 14
14 8
8 9
3 10
4 11
5 12
6 13
7 14
1 8];
%// Patch index of the object
PatchIndex{1} = [1 2 3 4 5 6 7];
PatchIndex{2} = [8 9 10 11 12 13 14];
PatchIndex{3} = [2 9 10 3];
PatchIndex{4} = [3 10 11 4];
PatchIndex{5} = [4 11 12 5];
PatchIndex{6} = [5 12 13 6];
PatchIndex{7} = [6 13 14 7];
PatchIndex{8} = [7 14 8 1];
PatchIndex{9} = [1 8 9 2];
%// create a wireframe model
figure;
hold on;
for k1=1:size(LineIndex,1)
line([Point(LineIndex(k1,1), 1), Point(LineIndex(k1,2), 1)],
[Point(LineIndex(k1,1), 2), Point(LineIndex(k1,2), 2)],
[Point(LineIndex(k1,1), 3), Point(LineIndex(k1,2), 3)]);
end
axis equal;
axis([-0.5, 5, -0.5, 2, -0.5 2]);
view(-5, 32);
我现在已经看了这个代码2个小时了,我无法弄清楚为什么线功能不会接受参数并显示线框。
我收到的错误是:
错误:表达式或语句不正确 - 可能不平衡(,{或[。
答案 0 :(得分:3)
错误是因为您的语句跨越多行,MATLAB要求您在任何继续下一行的行的末尾添加ellipsis。
尝试
sc.hadoopConfiguration.set("mapreduce.input.fileinputformat.input.dir.recursive","true")