plot - plotting symfun and a self created function on same graph matlab -


i trying plot 2 function in matlab, first 1 of kinf symfun:

p = symfun(0, [m]); p(m) = p(m)+ck(k-3)*exp(m*(k-3)*complex(0, 2*pi/25)); 

here ck symfun , k variable pre-defined.

i want plot in same graph function created using function mode:

function [x1] = xt_otot_q3( t)... 

i cant make xt_otot_q3 function symfun because involves if statements. - tried create 2 vectors sampling 2 functions , plotting them plot function reason 'p' function vectors gets preatty grotesque giving me wierd output... - tried plotting them both using ezplot function reason sampled vector got form xt_otot_q3 shows straight line @ 0.

any ideas how should plot them together? plot xt_otot_q3 function must create vector if try plot directly using ezplot gives me following eror:

>> ezplot(xt_otot_q3, [-10 10]) error using xt_otot_q3 (line 2) not enough input arguments. 

thanks in advance.

if understanding properly, have 2 functions p, , xt_otot_q3. want plot them together.

syms t; func1 = xt_otot_q3(t); ezplot(func1, [-10 10]);  # retain current graph, new graph hold on; # symbolic function p ezplot(p, [-10 10]);  

i hope helps.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -