http://blog.sina.com.cn/s/blog_661159d50100lqv0.html,有图像不显示的,请查看我的sina博客
Reference
1, http://www.stanford.edu/class/msande337/notes/matlab tutorial.pdf
2, http://newsgroups.derkeiler.com/Archive/Comp/comp.soft-sys.matlab/2009-10/msg06187.html
3, http://www.stanford.edu/~dgleich/demos/matlab/random_graphs/erdosreyni.html
It has made mention of Graphviz when I read paper about Bayesian networks. I have no idea about this. It takes me a long time to learn it. And now I make a list for my installing Graphviz with MATLAB.
Please download these packages to your computer refer to [1], like GraphViz program, MATLAB to AT&T GraphViz program and MESHPART toolbox. [1] gives the hyperlinks to these packages. Then start by installing GraphViz on our computer.
If these all be done, we should add the target directory to MATLAB path, give my examples:
cd D:/SIAT/bayes/GraphViz2Mat1.2
pwd
addpath(genpath(fullfile(pwd, 'GraphViz2Mat1.2')));
savepath % save GraphViz2Mat1.2’s target directory to MATLAB path.
cd D:/SIAT/bayes/meshpartdist/meshpart
pwd
addpath(genpath(fullfile(pwd, 'meshpart')));
savepath % save MESHPART’s target directory to MATLAB path.
You have also not ready to start this, before you modify those files, refer to [2]
First, in dot_to_graph.m change (from line 92)
[node_pos] = sscanf(line(pos_pos:length(line)), ' pos = "%d,%d"')';
x(lst_node) = node_pos(1);
y(lst_node) = node_pos(2);
into
[node_pos] =sscanf(line(pos_pos:length(line)), ' pos = "%f,%f"',2)';
x(lst_node) = round(node_pos(1));
y(lst_node) = round(node_pos(2));
Second, in function draw_dot.m change line 43
labels = names(lbl_ndx);
into
labels = cellstr(num2str(num_names(lbl_ndx)'));
At last you can run the examples in [3]
Best wishes, good luck!
PS, give some pictures on my computer