how to plot shorter dataset using 'hold on'
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a dataset and want to plot a line of best fit to the beginning of the data which is the only part where it fits.
Currently, I have the lines of code:
scatter(T5half,logconductivity5(2:end))
hold on
y=-21.05*T5half-25.18
plot(T5half,y)
Does anyone know how to do this?
Thanks.
댓글 수: 0
채택된 답변
Jeff Miller
2022년 2월 26일
Is this what you need?
desired_range = 1:200; % here, select the array positions you want to plot
plot(T5half(desired_range),y(desired_range))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!