Stephni
Members-
Posts
31 -
Joined
-
Last visited
Stephni's Achievements
New Here (1/7)
0
Reputation
-
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.
-
function and subroutine in Fortran 77
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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! -
function and subroutine in Fortran 77
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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 -
function and subroutine in Fortran 77
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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 -
function and subroutine in Fortran 77
Stephni posted a topic in Command Line, Kernel and Programming
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 -
how to construct a Matrix of matrices element?
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
yes yes, it is sparse matrix -
how to construct a Matrix of matrices element?
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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 -
how to construct a Matrix of matrices element?
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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
-
reduce the image size after editing by gimp
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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 -
reduce the image size after editing by gimp
Stephni replied to Stephni's topic in Command Line, Kernel and Programming
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
-
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