MATLAB Answers

Some problems with “writematrix” function。

2 views (last 30 days)
liang deng
liang deng on 24 Nov 2020
Commented: liang deng on 24 Nov 2020
I want to not write double quotes when using the “writematrix” function to write a character matrix to txt.
Can you help me?

  0 Comments

Sign in to comment.

Answers (1)

VBBV
VBBV on 24 Nov 2020
Edited: VBBV on 24 Nov 2020
%if true
T = ["100011";"101000"];
iwant = str2double(T);
writematrix(iwant,'your file.txt')

  1 Comment

liang deng
liang deng on 24 Nov 2020
But if the beginning of my string is 0, it seems that there is no way to convert it to double format.
Please help me ! ! !

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!