Matlab to other file dot transfer as comma??

6 views (last 30 days)
byzt3005
byzt3005 on 5 Aug 2016
Answered: Gustav Karner on 14 Jan 2020
at matlab for numbers 'dot' is used as a decimal symbol but when I try to paste this numbers to the other files (excel,text file) it turns automatically 'comma'. I did all other changes in windows but the problem results from matlab likely. How can I solve this comma dot confusion at matlab?
  2 Comments
Stephen23
Stephen23 on 5 Aug 2016
Edited: Stephen23 on 5 Aug 2016
@byzt3005: this likely has nothing to do with MATLAB, but depends on your Windows/Office/... settings. They will interpret a decimal values depending on your locale/language settings. It is possible to fiddle around and try to get everything to play nicely, but in my experience it always fails somewhere...
The most reliable solution is to install and use the US English version of Windows (and other programs), then this problem never arises. As most programming languages use US English this makes many things much simpler: e.g. the US keyboard layout is easier to write code with too.
Luis Corbala Robles
Luis Corbala Robles on 8 Jun 2017
What I did:
1-Control Panel -> Region and Language
2-[Formats] Choose Format: "English (United Kingdom)"
3-Restart computer
Note(s):
-Does not necessarily need to be "English (United Kingdom)", what matters is that in [Additional Settings (within [Formats])] the Decimal Symbol is set to "." (i.e. dot).

Sign in to comment.

Answers (2)

Gustav Karner
Gustav Karner on 14 Jan 2020
Go to Preferences and chose Variables.
Change "Decimal separator for exporting numeric data via clipboard:" to a point.

Andreas Goser
Andreas Goser on 5 Aug 2016
I tried the following
a=1.2
in MATLAB and then select and copy the "1.2" from the MATLAB R2016a command window.
Then I pasted into a Notepad file - > "1.2"
Then I pasted into a MS Excel file - > "01. Feb"
I assume this happens as of Excel interprets the string based on my language and local settings as a date. Maybe this happens to you to?

Categories

Find more on Entering Commands in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!