Function to evaluate plots (MATLAB® Grader)

版本 1.0.0 (2.3 KB) 作者: David Kosfelder
This function allows you to search for a specific line in the gca-object. Can be used if a student plottet something correctly in ML-Grader.
84.0 次下载
更新时间 2020/7/10

查看许可证

This is a function created for the MATLAB®-Grader Course "Einführung in die Programmierung" ("Introduction to Programming") for Students of Bio-/Chemical Engineering at TU Dortmund. However this function can be used to determine if a Line (Object created by plot function) is in the current plot. This function uses the gca object, so no additional variable needs to be a assigned by the student (Or in your code)

Usage:
mg_isCurveInPlot('Patameter1', 'value1', Patameter2', 'value2', ...);

Return:
logical 1: A line in the current Graph fits the requirements.
logical 0: No line in the current Graph fits the requirements.

Notes:
You can check any property of the line object.
Most useful ones are:
XData, YData, ZData: 1 x n - vector
LineStyle: Char Array
LineWidth: Scalar
Color: Color-Vector

Look at the line object to get more information.

引用格式

David Kosfelder (2025). Function to evaluate plots (MATLAB® Grader) (https://ww2.mathworks.cn/matlabcentral/fileexchange/78011-function-to-evaluate-plots-matlab-grader), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2019a
与 R2019a 及更高版本兼容
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0