how do i write 20logbase10 in matlab
現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
古いコメントを表示
採用された回答
Star Strider
2014 年 7 月 8 日
You just did — almost.
x = 0.5;
dB = 20*log10(x);
produces:
dB =
-6.0206e+000
8 件のコメント
seshi reddy
2014 年 7 月 8 日
Undefined function 'log' for input arguments of type 'uint8'.
Error in signaltonoise (line 17)
20*log(10,a1);
i am getting this error in my code
Image Analyst
2014 年 7 月 8 日
Cast the badly-named "a1" to a double if that's what it wants.
seshi reddy
2014 年 7 月 8 日
i did not get you, what do you mean by a double??
seshi reddy
2014 年 7 月 8 日
looking forward for your reply sir
Star Strider
2014 年 7 月 8 日
ans = 20*log10(double(a1));
seshi reddy
2014 年 7 月 8 日
oh ok thank you so much, but when i was doing in the command window i was getting the answer, can you explain me why is it happening like that. dont mind that if these are stupid questions, i am asking because i am new to this software
Star Strider
2014 年 7 月 8 日
My pleasure!
You should have gotten the same result in your script as with the Command Window if you entered the same commands, unless you somehow implicitly converted a1 to double before you issued your Command Window call to log10. That’s the only way I can explain it.
No questions are stupid questions. No worries.
seshi reddy
2014 年 7 月 8 日
yeah got it thank you so much
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
