plot the raw data and model on the same plot

답변 (1개)

Jyothis Gireesh
Jyothis Gireesh 2020년 2월 11일

0 개 추천

The following code may be of help in displaying the raw data and model on the same plot.
clear;
close all;
t = [10 12 20 25 40 50];
tensileStr = [8 18 20 34 44 46];
tensileStrCalc = 2.94 + 0.952*t;
plot(t, tensileStr,'o', t, tensileStrCalc,'-');
xlabel('Time');
ylabel('Tensile str (TS, MPa)');
legend('Tensile str', 'Tensile Str Calculated', 'Location', 'southeast');
title('Tensile str vs Time plot');

카테고리

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

질문:

2020년 2월 5일

답변:

2020년 2월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by