Octave xlswrite seems to work but I can't find the file - linux

I am trying to use xlswrite in Octave to write to an excel file. The xlswrite command seems to work fine but I don't find the excel file in the current working directory after xlswrite is executed. In fact, I can't find it anywhere on my machine.
For example, I tried the following code to write data to a file:
A = eye(5,5);
status = xlswrite('myA.xlsx',A)
Detected XLS interfaces: status = 1
The write operation seems to have been successful but I can't find myA.xlsx anywhere. Any help in resolving this issue will be much appreciated.
FYI, I am using Octave 4.0.0 and io 2.2.9. The OS is linux mint 17.2.
Thanks,
HC
PS: The problem seems to occur when the working directory is on the cloud (Google Drive in the present context). If I change the working directory to a local directory, xlswrite seems to work fine.

Related

Golem Task respons back with runtime error 2, can't determine the cause

Repo for all code I've been using is updated here . When I run the requestor script it exits with a runtime error 2 (File not found). I am not sure how to further debug this or fix it. So far I've converted my code over to a python slim docker image to better mirror the example. It also works for me when I spin up a docker image that typing and running "/golem/work/imageclassifier.py --trainmodel" works from root. I switched all my code to use absolute paths. I also did make sure the shebang (#!) uses linux end of file characters rather than windows before which was giving me errors. Fixed a bug where my script returns error code 2 when called with no args to now pass.
clf.fit(trainDataGlobal, trainLabelsGlobal)
pkl_file = "classifier.pkl"
with open(pkl_file, 'wb') as file:
pickle.dump(clf, file)
is the only piece I could think of that causes the issue, but as far as I can tell this is the proper way to pickle something in python. Requestor script is also heavily based on the simple service example and I tried to mirror my design to that. I just need help in getting more information while debugging, or guidance on how to move forward from here

cant get biterr function to work in octave

I am using octave 4.0.3 in a fedora 24 system.
I wanted to use the function biterr, but it was not there along with octave, so i obtained it from octave communication package and copied to location of other already available .m files.
/usr/share/octave/4.0.3/m/signal
I have faced this issue with other functions as well but the above procedure always saved me. But with biterr function I am facing one more issue, it displays the error
'errcore' undefined
I obtained errcore.cc file also but don't know where to copy it so that biterr function works, ( I tried in same path but didn't help)
Where is the location i should copy errcore.cc ?
Thanks in advance

mcc -mv in linux machine R2013a

When I am trying to make executable files of my .m-files on a Linux machine, some of the the .m-files are working absolutely fine.
However, one file which has camera input inside the .m-file is giving me this error:
Depfun error: 'Unexpected Standard exception from MEX file. What() is: ..' Error using mcc Error executing mcc, return status = 1 (0x1).
But when I use the same .m-file on Windows and R2012a it is working properly without any error.
I found a bug report here - is this a similar problem?
How do I solve it?
Here is the simple code of my .m-file:
function yuv()
vid1 = videoinput('linuxvideo', 1, 'YUYV_1280x960');
set(vid1,'FramesPerTrigger',1);
start(vid1);
imageData1=getdata(vid1,1);
imageData=ycbcr2rgb(imageData1);
imagesc(imageData(:,:,:,1));
end
I was getting the same Depfun error, "What() is: ..", under R2013a on Linux but no errors when using a different OS or an older MATLAB version to compile my code. Following the bug report you linked to fixed it for me.
In the zip file linked to in the bug report you'll find a depfun.opts file. Rename or move your original depfun.opts file that's located in [matlabroot]/toolbox/compiler and copy the new one in its place.
Putting the new depfun.opts file in place is all it took for me to be able to compile using R2013a on Linux.
Also note, the bug report says that it could be caused by the importdata function or the Parallel Computing Toolbox but I'm not using either of those.

FTP.retrbinary fails

I'm a complete Python novice, so I apologize if the solution to my problem seems obvious. I'm having difficulty with some relatively simple code that I've written. I've scanned several related questions that have already been posted, but I don't see where my code differs in any meaningful way from the solutions suggested.
I'm trying to write a program that will:
Establish a ftp connection to a remote server.
Change the working directory on the ftp server.
Retrieve a list of files in the working directory from the ftp server.
Find a file ending with a specific suffix from the retrieved list of files.
Retrieve the found file to a temporary directory (created by tempfile.mkdtemp()) on the user's local file system.
Steps 1 through 4 are working as expected. Sadly, the last step is falling into my except clause.
Can anyone make a suggestion regarding what might be wrong with the following line of code?
ftp.retrbinary('RETR ' + file, open(opsys.path.join(localTempDir, fileName)).write)
Your suggestions are greatly appreciated. Thanks, in advance.
Possible problems:
- type(file) = incorrect value
- opsys.path.join(localTempDir, fileName) = incorrect value #nonexistent file
Thats all what comes to mind looking on presented line of code =)

Issues running FSL command in Linux environment

I am new to FSL, using version 4.1.8. I am trying to run a script that reads and generates *.nii files, which format is normally supported by FSL. I am calling an FSL function, probtrackx from within Matlab. However, I get the following error message seemingly unable to generate or recognize *.nii files:
** ERROR (nifti_image_read): failed to find header file for '~/Documents/fMRI_data/../DTI/fsl_dti/masks/target_mask_001'
** ERROR: nifti_image_open(~/Documents/fMRI_data/../DTI/fsl_dti/masks/target_mask_001): bad header info
ERROR: failed to open file ~/Documents/fMRI_data/../DTI/fsl_dti/masks/target_mask_001
ERROR: Could not open image ~/Documents/fMRI_data/../DTI/fsl_dti/masks/target_mask_001
The files do exist but FSL fails to recognize them. Any help as to how to correct the issue and get FSL to work properly would be most appreciated. I suspect it's a Linux settings issue, just not sure how to fix it. A solution to a related problem in a previous posting suggested adding ls='ls --color=auto'. I've tried it to on avail.
Some FSL tools assume that the $FSLDIR unix unvironment variable is set, which might not be the case in your MATLAB environment. You can fix that with something like setenv('FSLDIR', '/usr/local/fsl') (modified of course if your FSL installation is in a different place). Some also need the regular FSL setup script to be executed as well: system('. ${FSLDIR}/etc/fslconf/fsl.sh'). See also: http://www.fmrib.ox.ac.uk/fsl/fsl/downloading.html.
Instead of the more complicated probtrackx script, another thing to try first is simply:
system('fslhd ~/Documents/fMRI_data/../DTI/fsl_dti/masks/target_mask_001')
If this fails with the same error, then you know that you entered the path to the data incorrectly. For example, do you mean to have the .. in there?
Also, in the future, the best place to get FSL support is on their mailing list at: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=fsl
Does MATLAB have access to run other fsl commands? If you are able to run a command from the command line but not through MATLAB, the MATLAB user may not have access to run fsl or may be looking for some FSL variables.
You might have to do the equivalent of this for a linux system

Resources