Stephni
-
Posts
31 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Stephni
-
-
yes the matrix A with complex enrties, so the value returned by a matrix should be a complex, is there anything not logical?? and why Can't be both!
-
Thanks for help,.....
I have the following
I took off the external statement, and declare the function (Mat) in my main program as
complex*16 A, Mat
C then I call it as
A = MainMat(S1,S2)
But when I've done the following loop, it does not work
do i = 1,N
do j = 1,M
write(7,*) A(i,j)
end do
end do
so I changed in the declaration as A(N,M), BUT IT DOES NOT WORK AS WELL
-
thanks a lot, I think function is suitable for my job, but I've got a problem when I build a function, I need my function to produce a matrix, then I called the function in the main program by its name to give the matrix to the main program, but it does not work at all, I mean the matrix is computed correctly in the function but I failed to call it to the main program, here what I have in my code
main_program
c
complex*16 A(m1,m2), Mat
EXTERNAL Mat
c
A = MainMat(n,m)
.
..
end
complex*16 function Mat(n,m)
c calculate the elemnts of Mat
Mat = A
.
end
I need to return the matrix Mat, which I computed by the function to the main program
-
Hi everyone
I would like to know the difference between the function and subroutine in FORTRAN 77, and what kind of jobs each one is convenient for?? because I need to write a routine to do some job, but I do not know whether it should be a function or a subroutine???
thanks for help
Stefani
-
Dear all
Hi, can I call a subroutine inside another subroutine in Fortran 77???, also can I call a function in a subroutine???
Best
Stephani
-
And each of the elements in the "main" matrix is a 3x3 matrix too?
yes
Looks to me like you just have a 9x9 big matrix then, with lots of zeroes in it!yes, it is sparse matrix
-
thanks for help, mmmh just fell lazy to write down and ........anyway here much more details.......I used a loop to construct each matrix, so I have all the elements of eachmatrix actually I made small error the main matrix is square and should be made of 3 raws and 3 columns, so this means made up of 9 matrices, and I have all of their elements, just how to write a code to write the elements of the main matrix from these elemnts, how its indices look like. the diagonl of the main matrix is constructed from 3 identity matrices, and the upper diagnoal matrices are the zero matrices .......I do not know how to write the indices to construct the main matrix, as I need it to solve a linear system
-
I am using Fortran77
-
Hi everyone
can anyone please, help me how to construct a matrix whose elements are matrices elements, my main matrix A is constructed of 6 matrices, and I have all the element of these matrices, but the problem I do not know how to write a code to collect all these matrices to form the main matrix A, how the indices look like??
any help is appreciated
Stephi
-
Thanks for helping
actually I can save as jpg after I generate the photo from MATLAB, then edit it by Inkscape then save it as eps, Is there eraser in Inkscape as the only editing I want is to erase out some lines.
Best
Stephani
-
Thanks for help, actually I am using Gimp on Linux, and I need to edit some figures produced by MATLAB after I saved them as eps files, so I load them in Gimp as eps, as I am using this type in my Latex, so when I edited this figure by Gimp, still I want it as eps....and the quality option in Gimp only appears with type jpg but not eps
the only option with eps is select the file type, then pop up dialogue box it
shows the image size {width, height, x offset, y offset} .
I tried to resize the photo, but it loses some of its resolution.
any help
Stephani
-
Dear all
I face some problem when I edit some images by gimp, the new edited image becomes large compared with the original image , I mean it took too much space around 36.8 Mega Byte, and this make my pdf file huge as it contains many of such edited images.
the same problem with Corel Draw
So, is there a way to reduce the image size after editing by gimp or at lest keep the old size.
looking for help
stephani
-
7-zip offers better compression ratios... and if it's an imagefile, you can always use gimp2 to resize/change dpi/change format in a comprehensive and convenient way.
Surely enough, there are also other methods to manipulate images, but (IMHO) nothing comes close to the mighty gimp.
Thanks for your help, yes I faced this problem when I edit some images by gimp, it becomes large compred with the original image and this make my pdf file huge as it contains many of such edited images.
So, is there a way to reduce the image size after editing by gimp or at lest keep the old size.
best
Stephani
-
Dear All
how can I compress very big file, 144.3 MIGA BYTE, I used the command gzip -r foo.zip foo, it seems to be the compressed file is still big, I want a command that compress file that can be attached via emails.
best
Stephani
-
Hi everyone,
I have a mesh on the interior of a square as a triangles grids, 950 points in the interior which construct 1890 triangles, with the connectivity
how can I link these data to generate VTK format, as I need this format to be able to plot the data.
looking for help
-
Hi all
anyone know how to format a data file as a VTK file??
-
I've loaded data files of around 500k into Octave and generated data arrays probably much larger than that. It gets a bit slow when it really has to churn the data but it worked. Obviously it depends on how much RAM (and patience) you have :)
I've been recommended to format my data file as VTK, any idea how to do that??
-
Is octave suitable or large data file let say with size of 200 KB
-
Hi all
can anyone tell me how can I plot data as a contour by paraview??
[moved from Everything Linux by spinynorman]
-
THanks for your help.......can I put the body of subroutine in separate file, and in the main program just write
include 'subroutine_name.f'
the same of including the numerical recipes...
-
can anyone help me out in ......how to read a specific column id data file in FORTRAN 77, let say I have a data file of 5 columns , I need to read the third column.......
-
I am usinf open office , I want to type some equations in presentation file, but I could not find the Equation Editor, I tryied to drag it from tool, customise, inset menu, there is Equation Editor ther but I could not drag it there...........
-
Hi guyes
small question in presentation with LaTex, what is the command to add the slide number, e.g (1/25) ?
-
You are absolutely right guys, just my thought was to reduce my space and put everything in one thread, so I can say all my current questions are resolved aprt from the Latex question, so I will put it in separate thread
reading a data file with MATLAB
in Command Line, Kernel and Programming
Posted
Hi everyone,
please can anyone help me with this,
I need to read a matix which is stored in data file,
here is how I generate the matrix from FORTRAN
do i=1:500
do j=1:500
write(*,*) X(i,j)
end do
end do
the problem I do not how to read the matrix from the data file using MATLAB,
i want to know how to read the data file and then stored in a matrix,
below what I did to read the element form the data file; then stored in X(i,j)
fid = fopen('fort.dat', 'r');
for i=1:500
for j=1:500
X(i,j) = fscanf(fid, '%g );
end
end
here is the error message after run these lines..
[Fatal Error] :-1:-1: Premature end of file.
??? Error: File: PlotContour.m Line: 12 Column: 30
A MATLAB string constant is not terminated properly.