Copying logical from one .m to another

1 visualizzazione (ultimi 30 giorni)
Cside
Cside il 11 Ott 2019
Commentato: Cside il 12 Ott 2019
Hi,
I have a logical from one .m file that i would like to transfer to another.m file. I have tried copying and pasting, but it does not seem to be valid.
Any advice?
  4 Commenti
Walter Roberson
Walter Roberson il 11 Ott 2019
Are you sure that it is in the form of commands in a .m file at the moment? And not data that you are displaying to the command window?
Cside
Cside il 11 Ott 2019
i was copying the data prior, apologies. I have tried clicking on the logical in the other .m file and COPY, and pasted in the new .m file but the matlabimport tool popped up. Is there something i can type in the command window (in the new .m) to extract that logical in the old .m?

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 11 Ott 2019
mat2str(NameOfVariable)
Should give you a character vector that you can copy and paste

Più risposte (0)

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by