How to switch positive/negative sign to opposite value?
22 次查看(过去 30 天)
显示 更早的评论
Hello!
I need help figuring out how to reverse the sign of every number on an excel data sheet I am importing. (I have distance moved in the West direction, I need distance moved in the East direction, starting at 0,0 so I have to switch the signs)
For example, I want to change: 0.00019, -0.00125, 0.00056 to -0.00019, 0.00125, -0.00056.
Any help is greatly appreciated! I am not proficient in MatLab and usually use it for relatively simple programs to split up my data into different time segments, so please try to explain any MatLab jargon or complicated processes.
Thank you!
Jenna
0 个评论
采纳的回答
Image Analyst
2014-4-1
Have you tried:
T = readtable('yourWorkbook.xlsx');
T = -T;
I haven't tried it but it looks like it should work (assuming you have the latest version of MATLAB, and your data is in a rectangular table in your workbook).
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!