How to import exponent number from Excel column to MATLAB
1 次查看(过去 30 天)
显示 更早的评论
I have a list of numbers in excel column. I am looking to extract the exponent number (+ - symbol doesn't matter)
For example, in 2^-6 => I want '6'
in 2^-4 => I want '4'
Thank you for any help you can provide.
0 个评论
回答(1 个)
Chunru
2022-9-27
x = readtable("2powx.xlsx")
y = cellfun(@(a) sscanf(a, "%d^%d")', x.LSB, "UniformOutput", false)
y = cell2mat(y)
y = y(:, 1).^y(:, 2)
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!