help-octave
[Top][All Lists]

## Plotting Variable Output

 From: Edward Song Subject: Plotting Variable Output Date: Sun, 26 Oct 2014 14:58:03 -0700 (PDT)

```I have output produced from a complex mathematical economic model that
required many iterations. Because of its complexity, using matrices and
vectors was not feasible. The structure of my program was

Set Parameter Values
Set Initial Conditions
Create 40 loops to calculate values of economic variables for 40 periods
In each period, iterations are required due to nonlinear equations
Final period values are given a unique name to prevent all intermediate
values from being plotted
End Loop

Plot Economic Values versus time

My subroutine to plot consumption over time is:

plot(t, Consumption_g1)
title("Consumption Growth for Group 1 Family with Income and Wealth
Tax")
xlabel("Period")
ylabel("Consumption")
legend("Consumption")
print -dpdf 'cgrowthg1YT80KT5'

(The title means consumption growth for group 1, with income tax rate of 80%
and wealth tax of 5%) Unfortunately, no plot is created. The title, labels,
legend and title are created correctly. However, the axis only displays the
tail end of the data. Thus, on the X-axis, time periods for periods 38 to 46
are plotted, not from 0 to 40. The same is true with the economic variables.
But most important of all, there is no plot.

Is the problem because the variables are not put into matrices and vectors?
If so, how would I do this. I can't do it manually because the data output
is thousands of pages long, so I can't find the appropriate numbers. If not,
what are the other possibilities of what's going wrong?

--
View this message in context:
http://octave.1599824.n4.nabble.com/Plotting-Variable-Output-tp4667116.html
Sent from the Octave - General mailing list archive at Nabble.com.

```