matlab - How can I use local constants in the function definitions of ezplot? -


based on reference examples here, cannot seem use variables in workspace constants in function expressions. example, trying do:

ezplot('theta * (1 x y) - 0.5', 0,8,-5,4); 

where theta 3 x 1 vector results in error

theta * [1;x;y] - 0.5 cannot plotted in xy-plane. 

is there way around restriction?

if theta 1 x 3 (it cannot 3 x 1) can use

ezplot(@(x,y) theta * [1;x;y] - 0.5, [0,8,-5,4]); 

note cannot refer variable in workspace when defining function string. need create anonymous function. ranges plotting not separate arguments. need pass vector of length 4.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -