필터 지우기
필터 지우기

Getting "Unrecognized function or variable 'reshape'" error!!

조회 수: 13 (최근 30일)
Kumar Vishal Rai
Kumar Vishal Rai 2022년 5월 26일
답변: Chunru 2022년 5월 27일
I am running R2021b and using simple reshape function.
But Matlab is giving Unrecognized function or variable 'reshape'".
I checked for the path of this function and its present in the path values.
Any idea what could be wrong.
  댓글 수: 3
KSSV
KSSV 2022년 5월 26일
Show us the code you tried.
Kumar Vishal Rai
Kumar Vishal Rai 2022년 5월 27일
I am using following code:
reshape([1 2 3 4],:,1);
and getting the error!!

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

채택된 답변

Walter Roberson
Walter Roberson 2022년 5월 27일
reshape([1 2 3 4],:,1);
Notice the : . : by itself can only appear (a) in comments; (b) in character vectors; (c) in string() objects; or (d) as a subscript for a variable. So in context, that code would require that "reshape" is a variable. But reshape is not a variable in your code.
Perhaps you were looking for
reshape([1 2 3 4],[],1)

추가 답변 (1개)

Chunru
Chunru 2022년 5월 27일
%reshape([1 2 3 4],:,1);
reshape([1 2 3 4], [], 1) % use [] for auto computed size
ans = 4×1
1 2 3 4

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by