plot doesn't work

조회 수: 25 (최근 30일)
Lucio Antonio Rosi
Lucio Antonio Rosi 2022년 4월 29일
댓글: Lucio Antonio Rosi 2022년 4월 29일
The function plot doesn't work anymore, i tried to use the commands 'close all' and figure() before running my code but it doesn't show anything. For example,
clc, clear, close all
x=[1,2,3,4];
y=[2,3,2,1];
figure()
plot(x,y,'b-')
the plot comes out without a figure and it's gray.
Does someone know how to fix this?
Thanks in advance

답변 (1개)

Image Analyst
Image Analyst 2022년 4월 29일
Works fine for me in r2022a and in MATLAB online:
clc, clear, close all
x=[1,2,3,4];
y=[2,3,2,1];
figure()
plot(x,y,'b-')
What appearance are you looking for exactly?
You don't have an m-file called plot.m do you? What does this show:
which -all plot
  댓글 수: 1
Lucio Antonio Rosi
Lucio Antonio Rosi 2022년 4월 29일
I solved it by reinstalling matlab, i don't why it didn't work, i don't have any file named plot.m, but thanks anyway

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by