How to switch positive/negative sign to opposite value?
26 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jenna Marie
le 1 Avr 2014
Réponse apportée : Image Analyst
le 1 Avr 2014
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 commentaires
Réponse acceptée
Image Analyst
le 1 Avr 2014
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical 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!