Copying logical from one .m to another

조회 수: 1 (최근 30일)
Cside
Cside 2019년 10월 11일
댓글: Cside 2019년 10월 12일
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
Walter Roberson
Walter Roberson 2019년 10월 11일
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 2019년 10월 11일
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?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 11일
mat2str(NameOfVariable)
Should give you a character vector that you can copy and paste

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by