gnuplot - Data values greater than float capacity - plotting in Octave -



gnuplot - Data values greater than float capacity - plotting in Octave -

i have pretty simple octave script , i'm trying plot few values i'm getting error:

warning: gl-render: info values greater float capacity. (1) scale data, or (2) utilize gnuplot

the script is:

a = 0.2; z = 160; l = 8; w = 31.12; x = 0; g = 9.81; k = 0.785; rho = 1025; t = 0:10 eta_0 = -(1/g)*exp(0)*cos(k*x-w*t); u_x = a*w*exp(k*z)*cos(k*x-w*t); w_x = a*w*exp(k*z)*sin(k*x-w*t); p_d = -rho*a*g*exp(k*z)*cos(k*x-w*t); endfor plot(t,eta_0); hold on plot(t,u_x); hold on plot(t, w_x); hold on plot(t,p_d);

i can't find useful error after searching online , new using octave , gnuplot not sure how utilize gnuplot instead. using ubuntu 12.04. advice or help appreciated.

thanks!

you want loop follows, otherwise, you'll single info point, not curve:

for t = 0:10 eta_0(t) = -(1/g)*exp(0)*cos(k*x-w*t); u_x(t) = a*w*exp(k*z)*cos(k*x-w*t); w_x(t) = a*w*exp(k*z)*sin(k*x-w*t); p_d(t) = -rho*a*g*exp(k*z)*cos(k*x-w*t); endfor

or improve (without loop, using vectorised operations):

t = 0:10; eta_0 = -(1/g)*exp(0)*cos(k*x-w*t); u_x = a*w*exp(k*z)*cos(k*x-w*t); w_x = a*w*exp(k*z)*sin(k*x-w*t); p_d = -rho*a*g*exp(k*z)*cos(k*x-w*t);

the values trying plot big (~7e57), source of error. seek adding graphics_toolkit('gnuplot') @ origin of code utilize gnuplot graphics toolkit , see if works better. tried in octave 3.8 , works fine, giving me next plot:

gnuplot octave

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -