필터 지우기
필터 지우기

Why is this code not creating the plot ?

조회 수: 2 (최근 30일)
Josue Alvarado Rivera
Josue Alvarado Rivera 2021년 12월 8일
편집: Jaswanth 2023년 12월 27일
Is showing a message saying "error using plot Vectors must be the same lenght "

답변 (1개)

Jaswanth
Jaswanth 2023년 12월 27일
편집: Jaswanth 2023년 12월 27일
Hi Josue Alvarado Rivera,
I understand that you want to know the reason why the specified code is not creating the plot. From the information you have provided related to the code and the error message, the most likely reason could be that the x and y variables you are trying to plot are of different lengths.
For vector and matrix data, to plot a set of coordinates connected by line segments, x and y need to be specified as vectors of the same length.
Kindly verify the length of the vectors x and y using the following command and check if they are the same.
length(x)
length(y)
Please refer the following MathWorks documentation to know more about the functions mentioned above.
Hope the provided information helps you in rectifying your problem.
Thanks.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by