How do I plot contour lines corresponding to matrix values?

Two matrices hold dimension values "b" and "h" corresponding to a rectangular beam cross-section -> matrix dimensions [bmax,1] and [hmax,1]. There are two matrices for "UC" (Unity Check) that hold values representing the safety factor for beam deflection and maximum stress relating to the two dimensions "b" (base) and "h" (height) -> matrix dimensions [bmax,hmax]. Plotting a contour of a value of "1.0" and "0.9" will show the lines of failure, and selecting a point above both of the UC contours (less than 1) corresponds to safe design dimensions. Unfortunately, when plotted using the routine below, the values along the contour line do not match up with the values for unity check. Here is the code:
val_ContourUC=[1.0,0.9];
[c1,h1]=contour(val_b,val_h, transpose(val_UCStress), val_ContourUC,'g');
clabel(c1,h1);
grid on;
hold on;
ylabel('height (mm)');
xlabel('base (mm)');
title('Contour Plot for UC');
[c2,h2]=contour(val_b,val_h,transpose(val_UCDeflexion),val_ContourUC,'b');
clabel(c2,h2);
How can I properly employ the contour command to match the contour for UCStress and UCDeflexion to their actual values? The values for UC relating to any combination of "b" and "h" are accurate as checked with Maple and hand calculations.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

질문:

2018년 2월 3일

편집:

2018년 2월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by