Help importing .pdb file into Maple - maple

I realy know nothing about Maple, so any help would be nice. I am attempting to import a .pdb file into Maple, as part of converting some Mathematica code to Maple. I need something that that can accomplish something equivalent to the Import command in Mathematica. I have tried using readdata, ImportData and fopen with little success. If anyone has any suggestions, that would be of great help.

There is no built-in reader for any of the different kinds of .pdb files in Maple.
Two suggestions:
Ask your question again on mapleprimes.
Import it in Mathematica and export it again as XML, which Maple can read.

Related

how to use functions written in someother worksheets in MAPLE

I have just started to use MAPLE. I am a matlab user.
In matlab I can use any matlab function(.m file) written in same directory.
Could someone help me out how I can do same with MAPLE. I have few worksheets performing some tasks(all in same directory)
I need to use those functions and write my own code.
Thanks in advance
Have you looked at packages? They use the same module structure as objects, but for a different purpose - they are meant to make code reusable.
A package can be maintained as source file and then be read from the current directory by its filename: read("MyModule.mpl"). This seems similar to what you are used from matlab, except that you would have to load the module explicitly. Alternatively it can be saved as binary *.mla file (Maple library archive) somewhere on the library path, then loaded by its exported package name from anywhere: with(MyModul).

Cannot create .xlsx file in Octave 3.8.2

I have just switched from Matlab to Octave 3.8.2 and spending a lot of hours to rewrite my programs.
The issue I am currently having is related to io pkg's xlswrite function.
In the code I have implemented, my Matlab code would search a directory for an .xlsx file with a given name. If there was such a file, it would change the filename to filename_v2 and write data in it , else it would create it first and then write data in it.
However, Octave doesn't seem to work this way.
Actually, whenever I am trying to create a file using xlswrite function I get the following error:
error: xlsopen.m: file filename.xlsx not found
Any idea how I could go round this problem?
Thank you very much in advance.
Kostas
EDIT: I am using Windows 7 and the exact code is:
if exist('Data Logger.xlsx','file')==0
name='Data Logger.xlsx';
else
found=1;
v=1;
while found==1
v=v+1;
name_cand=strcat('Data Logger_v',num2str(v),'.xlsx');
if exist(name_cand,'file')==0
found=0;
end
end
name=name_cand;
end
xlswrite(name,Header)
Solved: Its seems that Octave does not accept spaces in filenames.
Changed Data Logger.xlsx to Data_Logger.xlsx and everything worked perfectly
Thank you all for your willingness to help.
Cheers, Kostas

NONMEM 7.2 reads Matlab codes while processing structures printed by Matlab to csv

I need somebody familiar with both NONMEM 7.2 and Matlab R2013a to answer my question. I used the code published here: http://www.mathworks.com/matlabcentral/fileexchange/34889-struct2csv to make a datafile (a .csv file) for simulations in NONMEM. When NONMEM tries reading the .csv file, it ends up reading code of the file in Matlab. Why is this happening and what is the solution to this?
Additionally, if somebody has an alternative technique of writing structures to a .csv file, I would appreciate it. I'm sorry I cannot post the code because this is related to a research project in progress.
Regards,
Kumpal

Extract .mat data without matlab - tried scilab unsuccessfully

I've downloaded a data set that I am interested in. However, it is in .mat format and I do not have access to Matlab.
I've done some googling and it says I can open it in SciLab.
I tried a few things, but I haven't found any good tutorials on this.
I did
fd = matfile_open("file.mat")
matfile_listvar(fd)
and that prints out the filename without the extension. I tried
var1 = matfile_varreadnext(fd)
and that just gives me "var1 = "
I don't really know how the data is organized. The repository described the data it contains, but not how it is organized.
So, my question is, what am I doing wrong in extracting/viewing this data? I'm not committed to SciLab, if there is a better tool for this I am open to that.
One options is to use Octave, which can read .mat files and run most Matlab .m files. Octave is open source with binaries available for Linux, Mac, and Windows. Inside of Octave you can load the file using:
load file
See Octave's manual section 14.1.3 Simple File I/O for more details.
In Scilab:
loadmatfile('file.mat');
(Source)
I had this same interest a few years back. I used this question as a guide. It uses Python and SciPy. There are options for NumPy and hd5f as well. Another option is to write your own reader for the .mat format in whatever language you need. Here is the link to the mat file format definition.

Is there any way to read MATLAB's .mat files in Perl?

I have some data generated in MATLAB that I want to process using Perl. I saved the data from MATLAB in a .mat file. Is there any way to read it in Perl?
One option would be to save the binary MAT file as ASCII from inside MATLAB using something like:
load('test_data.mat');
save('test_data.asc', 'var1', 'var2', '-ascii');
Then you would have ASCII data to process in Perl.
If you need a solution completely written in Perl, then you should be able to automate the process using the Math::MATLAB package on CPAN.
NOTE: If Python is an option, you could use the loadmat function in the SciPy Python library.
The Java library JMatIO has worked well for me. Maybe you can try using inline Java.