help me finding this error
Mostra commenti meno recenti
Error using .* Matrix dimensions must agree.
Error in main (line 175) p = ((1-rho).*p + rho.*delta_p_current.*v).*delta_p_current + p.*(abs(1-delta_p_current));
2 Commenti
Rik
il 17 Mar 2018
The dimensions don't agree. You can't use an element-wise operation if the dimensions don't match.
Rik
il 18 Mar 2018
How do you expect me to read the code you e-mailed me? Did you manually removed all line ends? I will not have any look at your code unless and until it is in a readable format. You should either post it here (edit your question and use the {}Code button), or attach the m-file. (don't forget to attach any necessary other files as well in a zip)
If you use the debugger to stop execution at that line, you will be able to see the dimensions of each variable so you can check if any are a size you don't expect.
Also, you should try to convert this to a MWE. Remove a much code as you can that doesn't affect the error. Doing that already helps you find the error, and if you don't find it, we will have less code to debug.
Risposta accettata
Più risposte (1)
monisha silvia
il 18 Mar 2018
0 voti
Categorie
Scopri di più su Video Formats and Interfaces in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!