Rank: 1742 based on 81 downloads (last 30 days) and 5 files submitted
photo

Peter Lindberg

E-mail
Company/University
Skelleftea Kraft
Lat/Long
64.75, 20.95999908447266

Personal Profile:

Developer

Professional Interests:
Database communication, reports

 

Watch this Author's files

 

Files Posted by Peter View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 Jan 2010 Random walking picture Demonstration of a random walking subpicture within a picture Author: Peter Lindberg random walk, picture, animation, statistics 14 1
30 Dec 2009 Week numbering A function for creating a matrix containing a specified years dates ordered in weeks. Author: Peter Lindberg week, weeknumber, iso 8601 15 0
28 Dec 2009 Simple Excel sheet editing program Simple Excel sheet editing program Author: Peter Lindberg excel, format, activex, border, fontsize 24 0
22 Dec 2009 dynamic_sql_question How to create dynamic SQL questions. Author: Peter Lindberg sql, date, querybuilder, dynamic 14 1
22 Dec 2009 generate_date_from_uicalendar A simple code example, for generating date output as char from UICalendar. Author: Peter Lindberg uicalendar, gui 14 0
Comments and Ratings by Peter View all
Updated File Comments Rating
24 Feb 2010 Passive Mode FTP in MATLAB These files allow users to use passive mode FTP in MATLAB. Author: Idin Motedayen

Great, but the code only seems to work when I run it on my computer with Matlab installed. When I compile the code and run it with MCRInstaller, I guess It uses the original ftp code. Any tips, I've tried to copy the ftp.m code and rename it. Then including the renamed file when I compile, but I cannot use the function class(h,'ftp'). My guess is that ftp.m must be located in .../@ftp/
or?

04 Feb 2010 xlswritefig Write a MATLAB figure to a Microsoft Excel spreadsheet. Author: Michelle Hirsch

I changed line 80 to:

op = invoke(Excel.Workbooks, 'open', [filename]);

before it read:

op = invoke(Excel.Workbooks, 'open', [pwd filesep filename]);

but pwd filesep assumes you have the xl file in the same catalogue as your program. Just a thought.

12 Jan 2010 Random walking picture Demonstration of a random walking subpicture within a picture Author: Peter Lindberg

ex: picture_walker('c:\Documents and Settings\user\My Documents\My Pictures\',200)

27 Aug 2009 xlswritefig Write a MATLAB figure to a Microsoft Excel spreadsheet. Author: Michelle Hirsch

27 Aug 2009 xlswritefig Write a MATLAB figure to a Microsoft Excel spreadsheet. Author: Michelle Hirsch

I've added a "add a new worksheet function":

WorkSheets = Excel.sheets;
message = struct('message',{''},'identifier',{''});

try
Sheets = Excel.ActiveWorkBook.Sheets;
target_sheet = get(Sheets, 'Item', sheetname);
catch %#ok<CTCH> Suppress so that this function works in releases without MException
% Error if the sheet doesn't exist. It would be nice to create it, but
% I'm too lazy.
% The alternative to try/catch is to call xlsfinfo to see if the sheet exists, but
% that's really slow.
disp(['Sheet ' sheetname ' does not exist!']);
Sheet = invoke(WorkSheets,'Add')
Sheet.name = sheetname
target_sheet = Sheet
end;

Comments and Ratings on Peter's Files View all
Updated File Comment by Comments Rating
12 Jan 2010 Random walking picture Demonstration of a random walking subpicture within a picture Author: Peter Lindberg Lindberg, Peter

ex: picture_walker('c:\Documents and Settings\user\My Documents\My Pictures\',200)

22 Dec 2009 dynamic_sql_question How to create dynamic SQL questions. Author: Peter Lindberg Komarov, Oleg

"Dynamic" sounds pretty unsuited for this submission since its use has meaning only to the Author.
It would take me less time to write down a query from the beginning than modifying the output of your fcn.
Not to count the time needed to read what the fcn actually accomplishes...

Contact us