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!