How to plot like the following scatter plot on MATLAB?
조회 수: 1 (최근 30일)
이전 댓글 표시
I created the graph on Excel, but I would like to plot the following plot on MATLAB.
Though I run the script, it returns me the error , there was no tips to fix it on the documentation.
Please let me know how to plot the scatter plot on MATLAB.
error
>> sample
Error using scatter (line 46)
Not enough input arguments.
Error in untitled (line 8)
scatter(data,'filled')
script
data = [11,10;10,11;9,10;20,18;10,11;11,10;10,9];
figure;
plot(data)
figure;
scatter(data,'filled')mat
댓글 수: 0
답변 (2개)
VBBV
2023년 5월 10일
data = [11,10;10,11;9,10;20,18;10,11;11,10;10,9];
figure;
plot(data);grid
figure;
hold on
sz = 100;
scatter(1:size(data,1), data(:,1), sz,'filled')
scatter(1:size(data,1), data(:,2), sz,'filled')
grid
ylim([6 20])
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!