![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/298818/image.png)
Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
HI, I wanted to create a new function that plots a scatterplot of 2 columns of data and saves the Figure in a jpg. I was unable to do this using my code and wanted to know why, and what would work. format
조회 수: 1 (최근 30일)
이전 댓글 표시
%I created some data for my scatterplots
Data = randi(10, [20,2])
%then I tried to make a function
function[X,Y] = ScatterGraph(x,y)
%plots a scatterplot
%plots a scatterplot of x against y
x = (Data ( : , 1))
y = (Data ( : , 2))
Scatter(x,y)
end
saveas( 'scatterplot.jpg')
댓글 수: 0
답변 (1개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!