decimal in wrong position when dividing a 1x10 column by single variable.
2 ビュー (過去 30 日間)
古いコメントを表示
F = [0;1650;3400;5200;6850;7750;8150;8500;8750;9000];
A = (0.4/2)^2 * pi();
sigma = F/A
% my problem occures when i divide F/A. The decimal place is shifted over 4 positions to the left
% the answers are the same, just the decimal place is off.
1 件のコメント
回答 (1 件)
Walter Roberson
2023 年 8 月 31 日
format long g
F = [0;1650;3400;5200;6850;7750;8150;8500;8750;9000];
A = (0.4/2)^2 * pi();
sigma = F/A
The answers were not wrong: you were just overlooking the 1.0e+04 * just before the numbers. When you use the (default) format short then if you have numbers above about 100 or below about 0.01 in the mix, then the result will be show in scientific notation with a common factor shown at the top.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!