Multiply Each Cell Value in Double by 1000
10 views (last 30 days)
Arif Hoq on 10 Feb 2023
Dinesh on 10 Feb 2023
You can use the following code to accomplish what you want:
x1 = x1 * 1000;
dlmwrite('output.txt', x1, 'delimiter', '\n');
The first line multiplies each cell in the array by 1000.
The second line writes the modified array to a text file "output.txt" where each of the cell value occurs in a new line.