Info

This question is closed. Reopen it to edit or answer.

how to change this error

1 view (last 30 days)
Dhanya shree Srihari
Dhanya shree Srihari on 12 Oct 2017
Closed: MATLAB Answer Bot on 20 Aug 2021
Undefined function or variable 'water_r'.Error in sc (line 10) meanwater_r=mean(water_r);
  1 Comment
Andrei Bobrov
Andrei Bobrov on 12 Oct 2017
Defin your variable water_r.

Answers (1)

KL
KL on 12 Oct 2017
if you're using it inside another function, you have to pass it as an argument.
function output = yourFunction(bla, bla, water_r)
...
meanwater_r=mean(water_r);
...
end

This question is closed.

Community Treasure Hunt

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

Start Hunting!