Error using ' Transpose on ND array is not defined.

조회 수: 4 (최근 30일)
Ronald Kagwisagye
Ronald Kagwisagye 2013년 7월 30일
After reading values from a gray scale input image and inputting other parameters following the code below:
% read data from input file x = imread(file_in);
% arrange data read from image for OFDM processing w = size(x,1); h = size(x,2); x = reshape(x', 1, w*h);
it gives the error message: Error using ' Transpose on ND array is not defined. Error in ofdm_simulation (line 34) x = reshape(x', 1, w*h);

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 30일
You image x is probably nxmx3. check it by
size(x)

추가 답변 (1개)

Jan
Jan 2013년 7월 30일
The first step for such problems is using the debugger:
dbstop if error
Then run the code again until the error occurs. Now you can check the locally used variables:
size(x)
When it is an RGB image:
x = reshape(permute(x, [2,1,3]), 1, w*h, 3);

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by