필터 지우기
필터 지우기

Undefined function 'concat' for input arguments of type 'double'.

조회 수: 4 (최근 30일)
Hiralben Mistry
Hiralben Mistry 2018년 11월 11일
답변: TADA 2018년 11월 11일
I am getting this error while running the following code. 'Undefined function 'concat' for input arguments of type 'double'.'
load train.mat; y1=y; load handel.mat; y2=y; load gong.mat; y3=y; concat(y1,y2,y3);

답변 (1개)

TADA
TADA 2018년 11월 11일
The error message pretty much sums it up. You can't concat arguments of type double.
If you are trying to create a vector, use either the bracket syntax
v1 = [y1, y2, y3] % for a row vector (commas aren't mandatory)
v2 = [y1; y2; y3] % for column vector (semicolons are mandatory)
or you can use the equivalent functions vertcat or horzcat
If you're trying to generate a string, you must first convert them to strings
str = strcat(num2str(y1), num2str(y2), num2str(y3));
% or use brackets to concat the character vectors
str = [num2str(y1), num2str(y2), num2str(y3)] % again commas aren't necessary
% or the equivalent function call:
str = horzcat(num2str(y1), num2str(y2), num2str(y3));

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by