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'
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1137410/image.png)
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!