TEXTSCAN not value, comma, space problem.

3 vues (au cours des 30 derniers jours)
yosun yapar
yosun yapar le 25 Mai 2019
Commenté : NAVNEET NAYAN le 1 Oct 2021
Hi,
when a file contains both a space and a comma separated and none value data as appendix,
solutionestimate = textscan(fid,'%s %s %f %s %s %s %s %s %s %f %f %f %f %f %f %f ' ...
, 'Delimiter', {' ',','} , 'MultipleDelimsAsOne', true,);
output does not work correctly. Columns are shifting due to non-values.How can I solve this?

Réponse acceptée

dpb
dpb le 25 Mai 2019
Use readtable instead with a FixedWidthImportOptions object. You can begin by seeing if detectImportOptions can figure it out on its own; if not, edit the returned object to match the specific file format.
  2 commentaires
yosun yapar
yosun yapar le 26 Mai 2019
It worked.
Thank you,
NAVNEET NAYAN
NAVNEET NAYAN le 1 Oct 2021
Thank You So Much. I was stuck and I got a way out.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Variables dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by