Home > Archive > Matlab > April 2005 > graph coloring
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Could somebody provide an example how I can
1)Import a file into MatLab
2)Make sure it is in a Table Form (Matrix)
3)Convert the table/matrix into the Graph
3.1) Create Graph Coloring (for minimum graph coloring feature)
4)Plot the matrix in 2D and 3D
Thank you!
Leo
| |
|
| Hello Leo
maybe i can halp you a little bit...
... read .txt. Files
fid = fopen(file_name, 'r');
grades = textscan(fid, '%f %f', 'delimiter', '\t' , 'headerlines', 2);
ausgabe(:,1)=grades{1};
ausgabe(:,2)=grades{2};
fclose(fid);
Delimiter is here an Tab - for more information you can use the Help
... h=plot(ausgabe(:,1),ausgabe(:,2),'red');
(for 2D Plots)
...set(h,'Color','green')'
Sven
|
|
|
|
|