Mostrar comentarios más antiguos
Hello,
I've been trying to debug my matlab program for a long time now and think I've finally discovered the main source of error. I have in my code this:
mod = m.*(m0 + i.*(w./wr).*sqrt(m0*m))./(m + i.*(w./wr).*sqrt(m*m0));
It's pretty gnarly, but I think all you need to know that besides the variables i and wr, the rest of the variables are merely constants. wr is a 1x100 matrix, whereas i = sqrt(-1). My problem is that mod should also be a 1x100 matrix but it winds up being a 1x1 complex matrix instead. I thought that as long as I used ./ and .* I would be able keep mod as a 1x100 matrix since wr is in the equation. Any thoughts as to how I should resolve this issue? I've tried every combo of /,*, ./, and .* I could think of to no avail. Thanks in advance!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Random Number Generation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!