我想找到一種在MATLAB中繪製桁架的方法,我可以通過使用鄰接矩陣和gplot函數來實現,但是它非常冗長的方法,特別是在連接了很多節點的情況下彼此。有沒有更快的方法來做到這一點?MATLAB和gplot
0
A
回答
0
我認爲gplot是繪製桁架的好函數。但是,可以簡化鄰接矩陣的創建。
例如,如果你的coordinates
存儲在n乘2陣列,並且對於每對節點的由小於dMax
分離的支柱,可以創建鄰接矩陣是這樣的:
%# create a distance matrix
distMatSquared = coordinates * coordinates'; %' #SO formatting
%# create an adjacency matrix that has a 1 wherever
%# distMatSquared is smaller than dMax^2, and that has 0 everywhere else
adjacencyMatrix = distMatSquared < dMax^2;
%# plot the truss with circles at the nodes
figure,gplot(adjacencyMatrix,coordinates,'-o');
0
如果這是在材料意義上的力學桁架:
http://www.mathworks.com/matlabcentral/fileexchange/2170-mastering-mechanics-1-using-matlab-5
和配套書
http://www.amazon.com/Mastering-Mechanics-Using-MATLAB-Materials/dp/0138640343
我寫了一些桁架可視化和物質材料的一般強度。
相關問題
- 1. gplot版dotplot
- 2. 如何在matlab中保存gplot輸出到文件?
- 3. SAS Gplot覆蓋線圖
- 4. R:如何:使用gplot和geom_density繪製3d密度圖
- 5. 如何區分gplot中的背景顏色和NA值
- 6. SAS中的GPLOT中的顏色選項
- 7. Matlab 2011b和mingw64
- 8. Matlab Impoint和Uicontrol
- 9. bsub和Matlab
- 10. Matlab和addpath
- 11. Matlab和XTickLabel
- 12. Matlab和Arduino
- 13. Matlab,system和exe
- 14. ndgrid和interpn - MATLAB
- 15. 和5 MATLAB
- 16. MATLAB和ATi GPU
- 17. MySQL和Matlab
- 18. 脊和MATLAB
- 19. matlab和simulink
- 20. Matlab和網站
- 21. asp.net和matlab
- 22. MATLAB audiorecorder和wavwrite
- 23. Matlab:數組求和總和
- 24. cosh和登錄MatLab
- 25. matlab符號求和
- 26. 鏈接AnyLogic和Matlab
- 27. Matlab的 - 總和&^ 2
- 28. matlab和C++精度
- 29. java和matlab集成
- 30. 累積求和 - MATLAB
這個問題,我需要對你的想法有一個小小的混亂,讓它爲我的桁架工作,但是你需要答覆。 – JPC 2010-05-20 10:18:30