Clear Filters
Clear Filters

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

4 views (last 30 days)
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);

Answers (1)

TADA
TADA on 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));

Categories

Find more on Large Files and Big Data in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!