Search Comments and Ratings

go

   
Date File Comment by Comment Rating
20 Aug 2014 DeployAnywhere.zip Example code for "Deploy Anywhere" article in "Art of MATLAB" blog. Author: Peter Webb jeffrey

it is benefitial

02 Jun 2014 Introducing Type Safe APIs with Builder NE Example code for initial type safe API post in the "Art of MATLAB" blog. Author: Peter Webb JOSE

02 Jun 2014 Introducing Type Safe APIs with Builder NE Example code for initial type safe API post in the "Art of MATLAB" blog. Author: Peter Webb JOSE

Missing files

20 Jan 2014 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb Pawel

Does anyone else have similar applications for DR / GPS? I mean for example the position of a vehicle using GPS which will cooperate with the DR and the results will be the processing of a Kalman filter

18 Oct 2013 Multiple Inputs and Outputs in Builder NE Type Safe APIs Example code for the "Art of MATLAB" blog post of the same name. Author: Peter Webb Ruben

04 May 2013 Deploying a Shared Library Example code for "Deploying Shared Libraries" posting in the "Art of MATLAB" blog. Author: Peter Webb Thuong

Thank you for sharing codes,
when I build MVS project, the following errors occur:
1>ClCompile:
1> vigenere.cpp
1>vigenere.obj : error LNK2019: unresolved external symbol _mclTerminateApplication_proxy referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _libvigenereTerminate referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl decrypt(int,class mwArray &,class mwArray const &,class mwArray const &)" (__imp_?decrypt@@YAXHAAVmwArray@@ABV1@1@Z) referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl encrypt(int,class mwArray &,class mwArray const &,class mwArray const &)" (__imp_?encrypt@@YAXHAAVmwArray@@ABV1@1@Z) referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _libvigenereInitialize referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _mclInitializeApplication_proxy referenced in function _main
1>vigenere.obj : error LNK2019: unresolved external symbol _mclGetEmptyArray_proxy referenced in function "public: __thiscall mwArray::mwArray(void)" (??0mwArray@@QAE@XZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _mclcppGetLastError_proxy referenced in function "public: static void __cdecl mwException::raise_error(void)" (?raise_error@mwException@@SAXXZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _mclcppCreateError_proxy referenced in function "public: __thiscall mwException::mwException(void)" (??0mwException@@QAE@XZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _ref_count_obj_addref_proxy referenced in function "public: __thiscall mwException::mwException(class mwException const &)" (??0mwException@@QAE@ABV0@@Z)
1>vigenere.obj : error LNK2019: unresolved external symbol _ref_count_obj_release_proxy referenced in function "public: virtual __thiscall mwException::~mwException(void)" (??1mwException@@UAE@XZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _error_info_get_message_proxy referenced in function "public: virtual char const * __thiscall mwException::what(void)const " (?what@mwException@@UBEPBDXZ)
1>vigenere.obj : error LNK2019: unresolved external symbol _mclGetString_proxy referenced in function "public: __thiscall mwArray::mwArray(char const *)" (??0mwArray@@QAE@PBD@Z)
1>vigenere.obj : error LNK2019: unresolved external symbol _char_buffer_get_buffer_proxy referenced in function "public: __thiscall mwString::operator char const *(void)const " (??BmwString@@QBEPBDXZ)

Could you know how can i fix it.
Thank you!

23 Jul 2012 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb Da Na

work great,very cool

24 Apr 2012 Managing Deployed Application Output with Message Handlers Example code for "Managing Deployed Application Output with Message Handlers". Author: Peter Webb Christian

Peter,

thanks for this submission.

It works just fine for a command line application. However for a GUI application I can't suppress the command window compiling with log.c.

Can you please advice what needs to be changed in log.c (and possibly also in the mbuild-command?) to suppress the command window for Windows GUI applications?

Thank you

Christian

31 Oct 2011 Creating Builder NE Web Services for Firefox, IE, Chrome and Safari Code for "Art of MATLAB" post -- how to create WCF services that communicate using JSON. Author: Peter Webb Titus Edelhofer

Nice! A simple and nice way to have a service running on a server that is web accessible and requires no installation at all on the Client side.

19 Aug 2011 Managing Deployed Application Output with Message Handlers Example code for "Managing Deployed Application Output with Message Handlers". Author: Peter Webb Peter Webb

Russ,

The MATLAB Compiler generates libmsgfcn.h and libmsgfcn.lib. And yes, this will be a topic for a future blog post (to be published in Sept. or Oct. 2011, most likely).

18 Jul 2011 Yprime.zip Visual Studio .NET project for building MEX files. Author: Peter Webb w hr

09 Jun 2011 Managing Deployed Application Output with Message Handlers Example code for "Managing Deployed Application Output with Message Handlers". Author: Peter Webb Russ

Hi Peter,

This looks like a very interesting way to redirect the output streams in deployed applications, however, the ZIP file available for download does not appear to include the libmsgfcn.lib and libmsgfcn.h files. Could you advise me where to locate these files please.

Your example here seems to relate to output redirection when calling the shared libary from a standalone C application - is it possible to achieve a similar effect when calling the shared library from a .NET applicatation? I am are running in to problems when the compiled Matlab code tries to output text to the console (i.e. standard output stream) which causes the .NET application to throw an exception.

The only advise I have been able to find online for redirecting streams is to use evalc() in the compiled code, however, this is not very elegant.

Do you have any plans to elaborate on this important subject in one of your excellent blog posts?

Regards,

Russ

05 Oct 2009 Handling MATLAB Events in Excel Source code for Sept. 2006 News and Notes Programming Patterns article. Author: Peter Webb Baiju Max

Hi,

I have written a long running algorithm (takes 15 to 30 Mins to complete) in MatLab and converted it to a dotnet 2.0 assembly using 'deploytool'.I am using VC# to call the Matlab function and everything works just great.

However the only problem is that i cant see the progress of the program .The user clicks OK button and then he has to wait for 15-30 minutes for the results.

One solution I see to solve this problem to raise events (to report progress) from matlab and subscribe the same in VC# and inform the user about the progress.

Is there any way of doing the same?

02 Mar 2009 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb Greg Freeman

>> DisplayStockData('S', '1/1/2000', 'm', 27)
Contacting server...
Reading data for symbol S...
??? Error using ==> datenum at 174
DATENUM failed.

Error in ==> GetStockData at 47
date = datenum(dates);

Error in ==> DisplayStockData at 18
[open, high, low, close, date] = GetStockData(symbol, startdate, frequency, periods);

Caused by:
Error using ==> datevec at 286
Cannot parse date 9.84.

I entered everything as stated in the file, trying the example, and it fails. I am running MATLAB V 7.6.0.324 R2008a. What's up...

16 Jun 2008 Yprime.zip Visual Studio .NET project for building MEX files. Author: Peter Webb

I have verified that this .Net solution also works for Visual Studio 2008 Express and does not require the downloading of an addition platform SDK. When you first open the solution in the 2008 version, you have to go through a conversion process, which requires files to be write-able. But afterwards, the solution built and ran as a Matlab DLL. The only problem that I had is that for some reason, the library libut.lib did not exist on my machine, (although libut.dll did). It did not appear to be necessary to build yprime.c, but is probably need for me detailed programs.

11 Jan 2008 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

if (length(stockdata) > 0)
[dates, open, high, low, close] = ...
strread(stockdata,'%s%f%f%f%f%*n%*n', 'delimiter', ',', 'emptyvalue', NaN);
for dateind = 1:length(dates)
thisdate = dates{dateind};
thisdate = [thisdate(6:end) '-' thisdate(1:4)];
dates{dateind} = thisdate;
end

% Convert the string dates into date numbers. The plotting functions
% need these date numbers.
date = datenum(dates);
end

02 Nov 2007 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

thanks for th files.
this very easy to use.
but i have problem with OpenGPS.m
the error message is
"??? Undefined function or method 'OpenGPS' for input arguments of type 'char'."

can you help me again please.

15 Jun 2007 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

No matter what I do, I get this error:

>> DisplayStockData('S', '1/1/2000', 'm', 27);
Contacting server...
Reading data for symbol S...
??? DATENUM failed.
Failed to parse date string.
Error using ==> datevec
2003 is too large to be a month.

Error in ==> GetStockData at 47
date = datenum(dates);

Error in ==> DisplayStockData at 18
[open, high, low, close, date] = GetStockData(symbol, startdate, frequency, periods);

12 Apr 2007 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

14 Mar 2007 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

05 Jan 2007 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

.

MATLAB supports serial devices including RS-232 using the Instrument Control Toolbox.

When you use Instrument Control Toolbox, you are provided with a graphical tool to configure and control your serial device in MATLAB without writing MATLAB script. In fact, the tool automatically generates MATLAB script that you can reuse in your application. Type "tmtool" to launch this tool.

Visit the MATLAB serial resource page for more information and a downloadable MATLAB code example automatically generated with the graphical tool provided by the toolbox:
http://www.mathworks.com/serial

16 Dec 2006 Handling MATLAB Events in Excel Source code for Sept. 2006 News and Notes Programming Patterns article. Author: Peter Webb

please excel programing note sent

By Hipson Israel

16 Dec 2006 Handling MATLAB Events in Excel Source code for Sept. 2006 News and Notes Programming Patterns article. Author: Peter Webb

VB excel Programing work book

11 Dec 2006 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

FYI: I have some additional information re: how to use the "adjusted close" data to normalize the other columns for splits, dividends, etc. on my blog at http://luminouslogic.com/how-to-normalize-historical-data-for-splits-dividends-etc.htm

08 Feb 2006 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

line 42 in GetStockdata has to be updated to
[dates, open, high, low, close] = ...
strread(stockdata,'%s%f%f%f%f%*n%*n', 'delimiter', ',', 'emptyvalue', NaN);

to reflect Yahoo's current format for it's stock data tables. They now have a 6th column, the adjusted close price, which adjusts the historical close price for any subsequent splits.
Ideally, the whole set of routines should be updated to use the adjusted close price instead of the historical close price.

10 Jan 2006 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

I get this error, please any help?!

??? Trouble reading floating point number from file (row 2, field 3) ==> Dec-05,68.95,75.46,68.81,71.89,

Error in ==> C:\MATLAB6p1\toolbox\matlab\iofun\dataread.dll
Error in ==> C:\MATLAB6p1\toolbox\matlab\iofun\strread.m
On line 51 ==> [varargout{1:nlhs}]=dataread('string',varargin{:});

Error in ==> C:\MATLAB6p1\work\retreive_stock\GetStockData.m
On line 42 ==> [dates, open, high, low, close] = ...

Error in ==> C:\MATLAB6p1\work\retreive_stock\DisplayStockData.m
On line 18 ==> [open, high, low, close, date] = GetStockData(symbol, startdate, frequency, periods);

15 Dec 2005 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

correction:
"min" is a function and a var.
change the name of the function.

01 Jul 2005 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

it is very good

24 Mar 2005 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

Hi!
Well I got it reading data from my Garmin Etrex Legend in Matlab 6.1 after about 90 minutes of code debugging. There were many instances of '&&' in several functions where a single '&' were needed, and the final line in the sizeof.m function needs to be changed to:
s = getfield(typemap,type);

It's also a bit slow downloading the track-files, but that's OK.

Lastly, the analysis program has big trouble if you've got several dirrerent tracks in your GPS from different locations. So... you should clear it before capturing just the track you want.

What I was really looking for when I stumbled on this code is Matlab S/W that will read a NMEA string output from the GPS so I can store it in a file of my own format.

Is there code around to do that?

Thanks!

28 Feb 2005 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

Has anyone tried it behind a firewall?

05 Jan 2005 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

can I get the price of each 5 minntes or obtains the online price???

26 Jul 2004 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

i think following patches are required
to run the demo under R14:

GetStockData.m:40
% Parse the string data into MATLAB numeric arrays.
[dates, open, high, low, close] = ...
strread(stockdata,'%s%f%f%f%f%*n', 'delimiter', ',', 'emptyvalue', NaN);

to

% Parse the string data into MATLAB numeric arrays ( xx=data that we ignore here).

[dates, open, high, low, close, xx,xx] = strread(stockdata,'%s%f%f%f%f%f%f', 'delimiter', ',', 'emptyvalue', NaN);

%remove tailing comment
dates(end)=[];
----------------------------------------
change GetStockData.m:143
from

endYear = endYear + (mod(periods, 12));

to

endYear = endYear + (floor(periods/ 12))

01 Jul 2004 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

I meed a funcion to read a serial port.
I meed to read data from de port.

06 May 2004 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

Great concept, but seems to have problems.

>> DisplayStockData('S', '1/1/2000', 'm', 27)
Contacting server...
Reading data for symbol S...
??? Trouble reading floating point number from file (row 2, field 3) ==> Apr-03,24.15,29.19,23.76,28.34,

Error in ==> c:\usgs\matlab13\toolbox\matlab\iofun\dataread.dll
Error in ==> c:\usgs\matlab13\toolbox\matlab\iofun\strread.m
On line 51 ==> [varargout{1:nlhs}]=dataread('string',varargin{:});

Error in ==> C:\usgs\Matlab13\demos\JavaInternetGetData\GetStockData.m
On line 42 ==> [dates, open, high, low, close] = ...

Error in ==> C:\usgs\Matlab13\demos\JavaInternetGetData\DisplayStockData.m
On line 18 ==> [open, high, low, close, date] = GetStockData(symbol, startdate, frequency, periods);

>>

17 Apr 2004 Yprime.zip Visual Studio .NET project for building MEX files. Author: Peter Webb

Very good! It's save my life! :-)

27 Mar 2004 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

gathering information on matlab.

12 Mar 2004 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

Excellent

23 Jan 2004 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

can anyone send me a matlab 6.5 version? it doesn't work :(

22 Jul 2003 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

Works great, with a couple of tweaks for version 6.1. Very cool application.

21 Jul 2003 Serial Object GPS Example Code Read tracklog data from Garmin eTrex GPS devices. Author: Peter Webb

Was using eTrex Legend and Matlab 6.1 - are the differences between 6.1 and 6.5 sufficient to prevent this from working ?

Looks like a very useful application base, if I could get it to work.

04 Dec 2002 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

This is a nice demonstration of the use of Java classes in Matlab, but it is still pretty buggy and rather dependent on the financial toolbox for the most interesting results. The author's attempt to supply surrogate functions for those that might be in the F.T. (e.g. daxis in lieu of dateaxis) is a step in the right direction, but still needs some cleanup/debugging work.

02 Nov 2002 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

This package is a good idea, BUT IT DOES NOT WORK. Calling the function GetStockData results in an error message:
??? Unknown parameter 'emptyvalue'

:-(

14 Oct 2002 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

it would be nice if it worked

ยป DisplayStockData('S', '1/1/2000', 'm', 27)
Contacting server...
??? Java exception occurred:
java.net.UnknownHostException: table.finance.yahoo.com

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getAllByName0(Unknown Source)

at java.net.InetAddress.getByName(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.<init>(Unknown Source)

at sun.net.www.http.HttpClient.<init>(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.URL.openStream(Unknown Source)
.

Error in ==> c:\matlab6p5\toolbox\finance\finance\GetStockData.m (QueryServerForData)
On line 67 ==> stream = openStream(url);

Error in ==> c:\matlab6p5\toolbox\finance\finance\GetStockData.m
On line 25 ==> stockdata = QueryServerForData(symbol, startdate, frequency, periods);

Error in ==> c:\matlab6p5\toolbox\finance\finance\DisplayStockData.m
On line 18 ==> [open, high, low, close, date] = GetStockData(symbol, startdate, frequency, periods);

09 Oct 2002 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

Well it might look OK in the "News and Notes" but maybe these samples should actually work when downloaded.
This gives errors about missing functions!
Not a good example of anything.

25 Sep 2002 Display Stock Data Internet enabled data analysis and visualization. Author: Peter Webb

I like the lesson about querying a database over the web, but I think you left out a couple of functions from the zip archive: day.m month.m year.m

I couldn't run it without huge revisions, but then I don't have the financial toolbox.

Contact us