- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please help, I did not find anything to solve my problem with Compaq Visual Fortran.
The problem is that I cannot make CVF to draw realistic 2D graphs with Compaq Array Visualizer. For example I want to construct the graph of function y=x*x on the segment [0,2]. The code I use is below:
program pp
!we consider y=x*x function on segment [0,2]
use AVDef
use DFLIB
IMPLICIT NONE
integer n
parameter (n=100)
real y(n)
integer i
integer status
character(1) :: key
do i=1,n
y(i)=(0+2*i/n)*(0+2*i/n)
print *, y(i)
end do
call faglStartWatch(y, status)
print *, "Starting Array Viewer"
call faglShow(y, status)
call faglName(y, "My graph", status)
print *, "press any key to continue"
key = GETCHARQQ()
call faglEndWatch(y, status)
print *, "Done!"
end program pp
This code results in Compaq Array Visualizer 1.6 in the graph with 100 units on X-axis. Could you help me how to scale the X-axis so that I receive correct number (2)? The form of the graph is not correct also in spite of how much steps (n) I take.
Thank you very much.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
do i=1,n
y(i)=(0+(2.0*i)/n)*(0+(2.0*i)/n) ! or (0+2*REAL(i)/n)*(0+2*RAEL(i)/n)
print *, y(i)
end do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
do i=1,n
y(i)=(0+(2.0*i)/n)*(0+(2.0*i)/n) ! or (0+2*REAL(i)/n)*(0+2*RAEL(i)/n)
print *, y(i)
end do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
program pp
!we consider y=x*x function on segment [0,2]
use AVDef
use DFLIB
implicit none
integer n
parameter (n=1000)
real y(n)
integer i
integer status
do i=1,n
y(i)=(0+(2.0*i)/n)*(0+(2.0*i)/n) ! or (0+2*REAL(i)/n)*(0+2*RAEL(i)/n)
print *, y(i)
end do
call faglStartWatch(y, status)
print *, "Starting Array Viewer"
call faglShow(y, status)
print *, "Done!"
end program pp
After Data->Dimensions->Import(Scale Data) in CAV I receive the graph with proper numbers on axes, but still their ratio is not correct. How to make them to display on axes numbers which are in correct ratio, i.e. segment [0,4] of Y-axis should not be of the same length (or even less) as segment [0,2] of X-axis.
What to do to construct several curves in the same XY axes system?
Thanks.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page