How can I resolve the subscripted assignment dimension mismatch error (for the cwt plot)?

1 visualización (últimos 30 días)
Hello,
I have an issue with the syntax used for the wavelet plot. The syntax used is:
[cfs(:,i), f(:,i)] = cwt(signal(:,i),fs(:,i)).
I have placed this syntax inside a for loop, where 'i' is the Excel sheet name. However, I am facing an error saying, "Subscripted assignment dimension mismatch." Can you please guide me on how to fix this error? I would appreciate any help you can provide.

Respuesta aceptada

Christopher McCausland
Christopher McCausland el 22 de Nov. de 2023
Hi Navid,
Can you please post so information in relation to both your signal and fs variable? Or better yet attach them?
cfs, should probably be a three dimetional array, so:
cfs(:,:,i)
as the cwt will return a two dimentional image if this code is sitting in a for loop. However, until you give us a bit more information this is hard to solve, for example your input signal could be in columns, or may not be.
  12 comentarios
Navid
Navid el 23 de Nov. de 2023
Dear Christopher,
I wanted to express my gratitude for the valuable guidance you provided me. This part of the code:
mesh(t(:,i),f(:,i),abs(cfs(:,:,i)).^2)
truthfully gives a deeper understanding of the signal.
However, sometimes, a 2D cwt plot may be more suitable for monitoring specific frequency ranges of a signal.
Thank you for taking the time to share your knowledge with me. Your guidance has been instrumental in helping me improve my work, and I greatly appreciate it.
Best regards,
Navid
Navid
Navid el 23 de Nov. de 2023
Dear Walter Roberson, Your support is greatly appreciated. Thank you so much!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Continuous Wavelet Transforms en Help Center y File Exchange.

Productos


Versión

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by