Error when running a code

1 回表示 (過去 30 日間)
Letticia
Letticia 2023 年 8 月 9 日
回答済み: Walter Roberson 2023 年 8 月 10 日
この 質問 は Cris LaPierre さんによってフラグが設定されました
Error in SDY2 (line 19)
utd = A * exp(-z * wn * t) .* sin(wd * t + phi00);
  2 件のコメント
Image Analyst
Image Analyst 2023 年 8 月 9 日
What is the error??? You forgot to tell us! Please attach ALL THE RED TEXT, not just a snippet of it.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
John D'Errico
John D'Errico 2023 年 8 月 9 日
The point is, what you wrote is indeed a valid line of MATLAB code, as far as we can see. But what is valid out of context may not be valid, depending on the variables involved. Are some of them vectors or arrays? Did you define a variable named sin or exp? There are many things you may have done, that might make that line of code now fail. But nobody can know what you did, unless we see the error message itself. The COMPLETE message, all that is in red. It may even be that we need to see more, but the error message is often sufficient to know where your mistake lies. So start by helping us to help you.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 8 月 10 日
The code has non-scalar wavelet coefficients wn and wt, and is written assuming that t is scalar or row vector, but t is a column vector.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by