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.

Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Feb. 2018

Bearbeitet:

am 3 Feb. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by