I am wanting to transfer data that is input into a UI to a csv file. I am using dlmwrite currently but keep running into the issue of the csv not functioning properly. Dlmwrite is outputting nonsense text, and I frankly am lost on what to try. I've done all I know how to do.

4 件のコメント

Bob Thompson
Bob Thompson 2019 年 2 月 19 日
Can you post your code so far, as well as a sample of the current output, and why it doesn't line up with what you're looking for?
Daelyn Greene
Daelyn Greene 2019 年 2 月 19 日
I can't post my code (it's over 200 lines) but I can put a description of input vs output.
The items that are input to the UI are patient age, weight, height, name, study ID number, time, whether or not the patient is osteoporotic, gender, ethnicitiy, which bone, and a couple other things.
The output (which works when I use xlswrite(M.....)) is supposed to transfer over the input values to a csv that can be looked at and read at a later date. What it is actually exporting to the csv looks like this:
ⱒⱥⱣⱴⱡⱮⱧⱵⱬⱡⱲⰠⰨⱌⱡⱲⱧⱥⰠⱓⱩⱤⱥⰩⱈⱵⱭⱥⱲⱵⱳⱍⱡⱬⱥⱁⱦⱲⱩⱣⱡⱮⰠⱁⱭⱥⱲⱩⱣⱡⱮⱙⱥⱳⱷⱩⱵⱲⱡⱵⱲⱤⱧⱢⰴⰲⰴⰲⰴⰲⰴⰲⰴਲ
per isakson
per isakson 2019 年 2 月 19 日
編集済み: per isakson 2019 年 2 月 19 日
dlmwrite, Write matrix to ASCII-delimited file says dlmwrite(filename,M) writes numeric data in array M to an ASCII format file, i.e not text
Daelyn Greene
Daelyn Greene 2019 年 2 月 19 日
Do you know of a workaround for that then? Like how to transfer the text to a number array or something like that.

サインインしてコメントする。

 採用された回答

per isakson
per isakson 2019 年 2 月 19 日

0 投票

Something like
for jj = 1: len
fprintf( fid, '___\n', num(jj), txt{jj} )
end
is a standard approach
Another answer is under the tab, Examples, of tprintf, tprintf writes tabular data to a text file.

1 件のコメント

Daelyn Greene
Daelyn Greene 2019 年 2 月 19 日
I will try that. Thanks for the help!

サインインしてコメントする。

その他の回答 (0 件)

製品

リリース

R2018a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by