Creating Excel-like graphs

4 次查看(过去 30 天)
David RA
David RA 2013-3-15
回答: Sonesson 2024-1-2
Hi,
I would like to trace excel-like graphs. Meaning I have a pair of XY data of size 7 and if I plot with MatLab it joins the points with straight lines. I would like to do the same thing that the option "Scatter with smoothed lines and markers" does in Excel.
Thanks!

回答(1 个)

Sonesson
Sonesson 2024-1-2
Hello David,
The plot command takes a variety of colors and line- and marker-styles to customize your plots as seen here, read this documentation for more info.
x = linspace(-pi,pi,50);
y = sin(x);
plot(x,y,'ro-')
If the "smooth" line is the crux for you, might I suggest looking at this answer.

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by