![]() Omitting the (+java) flag removes this requirement. Maybe the smaller JRE (Java Runtime Environment) would be sufficient, but I have installed the full JDK. If you need Java support with the Java variant (+java) as above, you probably need a JDK (Java Development Kit) to get the necessary command line suff for that magic to work, so go to ( ) for a download. Probably some of the octave variant flags are unneeded for some people, but I went with the options suggested by and it works for me to get command line Octave up and running, as well as giving a nifty Octave.app in the /Applications/MacPorts directory. Sudo port install octave -gcc5+gfortran-accelerate+atlas+docs+fltk+graphicsmagick+java-gui-metis-qtgui+app+qt4gui+sound Sudo port install qrupdate -accelerate+atlas+gcc5 Sudo port install arpack -accelerate+atlas+gfortran Basically to get all of Octave 4 running, I did: sudo port install atlas +gcc5 It seems as though MacPort's default atlas variant doesn't play nice with Octave, and arpac and qrupdate also have issues with their default installion, needing specific "variants" to properly build. Using MacPorts ( ), with insight from instructions at (as well as and ) as well as the Octave wiki at This entry was posted in Octave and tagged GNU Octave, OS X by Peter Chrapchynski. Octave:120> figure(4) imshow(imadjust(TwoDimageReverse)) title('Inverse 2D FFT') Output Octave:119> figure(3) imshow(imadjust(phase)) title('2D FFT - Phase') Octave:118> figure(2) imshow(imadjust(magnitude)) title('2D FFT - Magnitude') Octave:117> figure(1) imshow(TwoDPulse) Title('Original Image') Octave:116> TwoDimageReverse = ifft2(PulseFFT) Octave:115> phase = angle(fftshift(PulseFFT)) Octave:114> magnitude=abs(fftshift(PulseFFT)) octave:112> TwoDPulse=imread('Downloads/block.png') My phases looks wonky and at this point the goal was just to test the installation on OS X. In the 2D world, a square is the equivalent of a pulse. In the 1D world, the FFT of a square wave is a sync function. For the curious, the FFT of the image results in a cross in the frequency domain which is in reality a 2D Sync function. I tested my installation with the image package by taking a white square on black background, performed a 2D FFT, displayed the magnitude and phase of the signal, and recreated the original image by performing an inverse 2D FFT. To install a package, run octave, (type octave in the terminal prompt) and execute the command pkg install -force for images pkg install -force image.The package is not automatically loaded. Octave comes with several optional packages depending on what you want to do. I thought the process was frozen but the activity monitor stated that it was busy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |