Filter löschen
Filter löschen

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

4 Ansichten (letzte 30 Tage)
Hiralben Mistry
Hiralben Mistry am 11 Nov. 2018
Beantwortet: TADA am 11 Nov. 2018
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);

Antworten (1)

TADA
TADA am 11 Nov. 2018
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));

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by