Rank: 215 based on 421 downloads (last 30 days) and 3 files submitted
photo

Jim Hokanson

E-mail
Company/University
Duke University
Lat/Long
40.4413, -79.9592

Personal Profile:

http://sites.google.com/site/jimhokanson/

Professional Interests:

 

Watch this Author's files

 

Files Posted by Jim View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
30 Jul 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson tdms, labview, convert, toolbox, data import 212 90
  • 4.77778
4.8 | 23 ratings
26 Mar 2012 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson http, urlread, urlread2 143 24
  • 5.0
5.0 | 4 ratings
29 Nov 2009 Unique Rows for a cell array Find unique rows of a cell array containing columns with strings or scalars, or N-D matrices Author: Jim Hokanson cell array, unique, rows 66 9
  • 4.88889
4.9 | 10 ratings
Comments and Ratings by Jim View all
Updated File Comments Rating
22 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

@Francisco,

My apologies on PATCH not working. This is a problem with the underlying Java classes. I'll try to look into alternative Java classes.

Jim

21 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

@Francisco,

Yes, both are. I've exposed the entirety of the HTTP request and response so you can do anything you want with it.

Jim

20 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

@Francisco,

My apologies on the confusing documentation. When providing headers you also need to provide the body so that the order of the inputs is maintained. In this case providing an empty body is fine.

urlread2 (url,'GET','',header)

One day I'd like to rewrite this code base so that this is unnecessary and clearer ...

Best of luck and let me know if you have any other questions.

Jim

13 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

@Dan,

Usually problems arise due to the site using javascript. To get around this I'll usually use a program called "Fiddler" (In Windows). I'll go to the site in my web browser and then look at Fiddler to see what requests are being made to the server. Look for a request and subsequent response from the site that contains the information that you want. Then look more closely at the request to see how you would make the same request.

Best of luck.

Jim

20 Jun 2014 MinMaxElem Min and max element and index - C-Mex faster than MIN/MAX Author: Jan Simon

Hi Jan,

I'm using 64 bit 2014a with 4 processors (8 cores). Matlab uses multiple cores for min and max as seen in the Performance section of the Windows task manager. Also, with x64 SSE2 doesn't exist.

http://msdn.microsoft.com/en-us/library/vstudio/jj620901(v=vs.110).aspx

AVX provides a small speedup but sadly you really need multiple core code to compete.

Also, some of the unit tests fail now ... perhaps due to the fp:/fast flag.

Jim

Comments and Ratings on Jim's Files View all
Updated File Comment by Comments Rating
22 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson Francisco

Thanks

22 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson Hokanson, Jim

@Francisco,

My apologies on PATCH not working. This is a problem with the underlying Java classes. I'll try to look into alternative Java classes.

Jim

22 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson Francisco

Hello.

http DELETE method works OK:

url ='https://api-fxpractice.oanda.com/v1/accounts';
header = http_createHeader('Authorization','Bearer XXXXXXXX-YYYYYYYYY');
urlread2(url,'DELETE','',header)

returns:

ans =

{
"id" : 619104742,
"instrument" : "EUR_GBP",
"units" : 1,
"side" : "buy",
"price" : 0.79643,
"time" : "2014-07-22T03:25:49.000000Z",
"type" : "BuyEntry"
}

Cheers

21 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson Francisco

Thanks for your answer.

I get this error message when I use the PATCH method here:
header = http_createHeader('Authorization','XXXXXXXX-YYYYYYYYY');
params = {'units' '2'};
uparams = http_paramsToString(params);
url ='https://api-fxpractice.oanda.com/v1/accounts/1125870/orders/619104742';
urlread2(url,'PATCH',uparams,header)
Error using urlread2 (line 157)
Java exception occurred:
java.net.ProtocolException: Invalid HTTP method: PATCH

at java.net.HttpURLConnection.setRequestMethod(Unknown Source)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.setRequestMethod(Unknown Source)

What do you think is causing it?
Cheers

Francisco

21 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson Hokanson, Jim

@Francisco,

Yes, both are. I've exposed the entirety of the HTTP request and response so you can do anything you want with it.

Jim

Contact us