![](/s/cache/9b/90/9b9000885b7dfb6bac3fb4ef0778cebd.png)
0
Beantwortet
input multiprecision values
Hi, how do I input/read from a file multiprecsion values (calculated elsewhere) into mp objects?
Customer support service by UserEcho
Multiprecision values produced by toolbox can be saved/read as usual:
>> A = magic(3);
>> save('test.mat', 'A')
...
>> load('test.mat', 'A')
However if your file contains multiprecision values generated by other software - you need to do the conversion.
The simplest way would be to convert computed values to string and then create 'mp' object from that string.
Export matrix to text file of simple format (all packages like Mathematica, Maple allow this): Every row is stored in one line, with space as an element separator.
Now you can load it with toolbox using the function: Important note. Please store matrix elements in text file using higher number of decimal digits than you specify in Mathematica/Maple. This will make sure that numbers are correctly rounded and accuracy is not lost when converted back to numeric by toolbox.