Jump to content

Stephni

Members
  • Posts

    31
  • Joined

  • Last visited

Posts posted by Stephni

  1. 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.

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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. 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

  8. 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??

×
×
  • Create New...