Problem running matlab script


I bought a second hand arbitrary function generator from Rohde and Schwarz. Unfortunately, in order to generate waveforms with the R&S Waveform Composer software, you need to register the generator and obtain a license code from R&S. After contacting R&S I was told that they no longer give out license codes for these instruments. :frowning:

Doing some research on the web I found a matlab script that is supposed to generate files readable by the function generator, without needing the R&S software.

I tried to run this script (test.m) with octave but I’m always getting the following error:

>> test

error: invalid call to script C:\Users\Admin\Desktop\am300wfrf110\am300wfraw.m
error: called from

  • am300wfraw*
  • am300wf at line 42 column 10*
  • test at line 31 column 8*

All files are attached: (12.7 KB)

Any help would be appreciated.

Best regards,

I cannot give you a definitive answer because my Octave installation is on Linux not Windows. From looking at the files in your zip archive, it looks like the am300wfraw.m script has only comment lines inside it and no code. I’m not sure how that would work. My assessment is that the script was superseded by a DLL with the same name but when you’re invoking test.m it is calling the script not the DLL and therefore not finding a return value.

Most probably your Windows installation is not recognizing the DLL as an executable. You can try setting the execute bit on it in file properties but that may or may not work. My suspicion is that from the age of some of those files (2005 to 2007) they were made for an earlier version of Windows that won’t run natively any more. (Bit rot.) Even if it did, you have no guarantee that the DLL has the same code as what was in the script. It might be malicious for all you know, especially if you do not know the provenance of the DLL or whether it came from the original author or a random internet source.

You should probably look for a different source to use your second hand instrument. There is an instrument control package in Octave that might be of use but it is not guaranteed.

Those .dll files look like some for of .mex(?) files to me.
Octave has a mex interface. But you’d need to re-compile those libraries from their sources for Octave.
Maybe you could try to contact the original author and ask if they would be willing to release those sources with a compatible license outside(!) the MathWorks’ FileExchange.

Ok, thank you very much for your feedbacks…seems I gotta find another way…