Azzera filtri
Azzera filtri

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

4 visualizzazioni (ultimi 30 giorni)
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);

Risposte (1)

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

Categorie

Scopri di più su Large Files and Big Data in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by