when i run the following code its showing an error that dimensions must agree
1 view (last 30 days)
Show older comments
vaishnavi potharaju
on 11 Dec 2018
Edited: madhan ravi
on 12 Dec 2018
w=(2.3.^-u.*log(1.+(0.5615./u)-0.4385*(((1.0421.*u))+(1/(1.+u.^1.5))+(1.0801./(1.+(2.35.*u.^(-1.0919))))))^-2./(0.5616+(0.4385+2.35.*2.3^(-2.283.*u))))
i want to calculate 'w' for a set of 'u' values.i'm confused while arranging '.' when i run this i get "error usin + and matrix dimensions must agree".
0 Comments
Accepted Answer
madhan ravi
on 11 Dec 2018
Edited: madhan ravi
on 11 Dec 2018
If you still have problem then use bsxfun() with mtimes and rdivide appropriately if your usig version prior to 2016b
w=(2.3.^-u.*log(1.+(0.5615./u)-0.4385.*(((1.0421.*u))+(1/(1.+u.^1.5))+(1.0801./(1.+(2.35.*u.^(-1.0919))))))^-2./(0.5616+(0.4385+2.35.*2.3^(-2.283.*u))))
^---dot missed
5 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!