How I can save a table into a dbf format
显示 更早的评论
I have the following error. Any help?:
dbfwrite(IT, 'mytable.dbf');
Error: File: dbfwrite.m Line: 1 Column: 1
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.
6 个评论
dpb
2023-2-18
## Copyright (C) 2015-2020 Philip Nienhuis
## Copyright (C) 2018-2020 Matthew Parkan
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
...
The m file looks like mayhaps it was to be preprocessed with something that would convert the "##" characters to valid comments in MATLAB-acceptable syntax, maybe??? That's the problem; MATLAB can't interpret the file with those as comments.
It also has many other non-valid syntax elements -- the use of "!" instead of "~" as the not operator and too many others to list...
Dimitrios Poulos
2023-2-18
dpb
2023-2-18
Not off top of head, no, never use .dbf files myself any more.
Where did you get the m-file from? Surely there's information there on how to make it work.
Or, you could try to patch it by hand-edits; it looks like the base code is mostly intact; not sure just what must have been the purpose behind it being in the form it is other than whatever code development toolset that was used must have a preprocessor that does such...
Dimitrios Poulos
2023-2-19
dpb
2023-2-19
I wondered about Octave; haven't had a version of it installed in 20 years+ now; didn't realize they had diverged so much from the compatibility of user code syntax. Knew were/are extensions, not aware went to the root of such basics.
@Dimitrios Poulos should be able to clean it up to run without too much extra trouble then, it would seem. I did a global substitution for the "##" comments and then found the "!" for NOT and quit after that, having no real need.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!