Error using hafmax command,

조회 수: 3 (최근 30일)
BP
BP 2021년 10월 4일
댓글: BP 2021년 10월 5일
I am trying to find the full width at half max of a pulse, I have the code below and it gives the following error. What is it telling me?
hafmax = vals*ymx;%calculates hafmax = [1 rise, 2 fall]
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix. To
perform elementwise multiplication, use '.*'.
Error in EMP_ASCO_Waveform_Analyzer_9_15_r2 (line 180)
hafmax = vals*ymx;%calculates hafmax = [1 rise, 2 fall]
Related documentation

채택된 답변

Image Analyst
Image Analyst 2021년 10월 5일
What does this show
whos vals
whos ymx
Is it possible you wanted an element-by-element multiplication instead of a matrix multiplication:
hafmax = vals .* ymx % Note the dot before the star!
  댓글 수: 1
BP
BP 2021년 10월 5일
Using "hafmax = vals .* ymx" took care of it.
Thanks,
BP

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by