How to concatenate data from two different functions in MATLAB?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Konard Adams
le 18 Jan 2022
Modifié(e) : Konard Adams
le 20 Jan 2022
Part of one function has this:
%% Concatenating Time & Point to Point Angles. Time will be the first column
ConcPTP1 = [TimeP2P1,P2PAng1]; %% getting the datat from here works
Part of the other function has this:
%% Concatenating Time & Angles. Time will be the first column
ConcLin1 = [TimeLin1,AnglesLin1]; %% getting the datat from here works too
Part of the main program has this
%% Collecting all Data
Concat = [ConcPTP1',ConcLin1']'; %%% ***my problem is here*** works only if everything is in one script
This works when everything is a single script but gives errors when I seperate the files as functions then call them from a main program. (The function method is needed). Everything else works fine, I only need to combine all the data from both functions as one ouput file.
Thank you in advance.
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!