How to take data from multiple variables and store them in one variable?
Ältere Kommentare anzeigen
suppose, I have 3 variables containg some data but I want to store all the datas of the 3 separate variables in a single variable.
Akzeptierte Antwort
Weitere Antworten (1)
John D'Errico
am 5 Jul. 2022
Bearbeitet: John D'Errico
am 5 Jul. 2022
Essentially, you just need to learn MATLAB. Read the various tutorials you can find. In there you would learn about the various variable classes available.
There are structs.
A.num = 1:5;
A.str = "The quick brown fox";
A.mat = rand(2);
A
There re cell arrays.
B = cell(1,3);
B{1} = 1:5;
B{2} = "The quick brown fox";
B{3} = rand(2);
B
There are simple arrays.
C = zeros(3,3);
C(1,:) = ones(1,3);
C(2,:) = 1:3;
C(3,:) = rand(1,3);
C
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!