Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Search results for query: *

  • Users: JockeK
  • Order by date
  1. JockeK

    Good way to catalog Matlab code?

    A quick method is to create a preparsed pseudocode file using the pcode function of your m-file and put the p-file on the network. or Use the Matlab Compiler toolbox to create a standalone executable program or a dll.
  2. JockeK

    Memory problem while doing video / image analysis in Matlab

    I'm not that familiar with video grabbing but I can give you some tips... You will surely benefit from preallocating memory for your image matrices, especially if you collect images inside a loop. img = zeros(h,w,3,n); h = height, w = width and n = number of images. Explore the possibility of...
  3. JockeK

    reversing a colormap

    This should do the trick blackwhite = colormap('gray'); whiteblack = flipud(blackwhite);
  4. JockeK

    Matlab timeout problem (controlling humanoid robot)

    I had a similar problem when using a USB to serial converter. Solved it by writing asynchronously to the port. fwrite(serialObj,output,'async')
  5. JockeK

    Animation of profiles

    How about reading in the profiles from the files inside a loop, plotting it and then adding it to the movie?
  6. JockeK

    read data file

    If you had bothered to read the docs, as I suggested, you would have seen an example of the fscanf function. Where the use of the fscanf is exactly the same as in Tom's post.
  7. JockeK

    read data file

    The documentation on fscanf contains an example of this. Use doc fscanf and you'll see that fscanf(fid,'%f %f',[2 inf]); will do the trick.
  8. JockeK

    how to change tick label font size?

    Both the x and y ticklabels are set using set(gca,'FontSize',20)
  9. JockeK

    joining two strings + using pointers to the variable within strings

    First: time_and_units = [time units]; Second: (same as the first, just add one space character) label([time ' ' 'ms/div'])
  10. JockeK

    MATLAB & RS232

    I believe hexadecimal numbers are always treated as ascii by Matlab. Use the hex2dec or the hex2num function to convert. The serial port object has some events and callbacks that will help you with the data collection part. Search the help for BytesAvailableFcn, BytesAvailableFcnCount and...
  11. JockeK

    Copying a figure and everything on it

    It does copy EVERYTHING. You just need to make sure you have a handle to the things you want to copy.
  12. JockeK

    Copying a figure and everything on it

    The copyobj function will do the trick.
  13. JockeK

    How do I expand the axes to eliminate all of the gray space in a figur

    Change the Position property. set(gca, 'Position', [x y width height]) The values range from 0 to 1. Set x=0, y=0, width=1 and height=1 to completely fill the figure. However, no axis labels or tick labels will be visible.
  14. JockeK

    fliplr function

    You need to flip each color separately. img = imread('photo.jpg'); for i=1:3 % loop through R, G and B imgflp(:,:,i) = fliplr(img(:,:,i)); % flip 2-D matrix end imshow(imgflp) % show flipped image
  15. JockeK

    amplitude of fft harmonics

    Here are two good guides http://www.mathworks.com/support/tech-notes/1700/1703.html http://www.mathworks.com/support/tech-notes/1700/1702.shtml
  16. JockeK

    Windows Apps using Matlab Compiler

    Sorry, can't help you with that. I'm not an expert I just grabbed this from the Mathworks Support about 2 years ago and I can't find it there now. "Subsystem" seems to be the keyword to search for in your compilers manual.
  17. JockeK

    Windows Apps using Matlab Compiler

    Edit the compiler options file before you compile cd(prefdir) edit compopts.bat Add the following line for your compiler LCC: set LINKFLAGS=%LINKFLAGS% -subsystem windows Microsoft Visual C/C++: set LINKFLAGS=%LINKFLAGS% /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup Borland: set...
  18. JockeK

    how to save a cell array

    A possibility is to first convert the cell to a struct using the cell2struct function, and then use the save function with the struct option.
  19. JockeK

    Noob need help reading rs232 via matlab

    Are both computers set to the same baud-rate? Maybe some of the other serial properties are different on your computers. Use get(s) to get at list of all properties. Are you using a nullmodem cable? See http://www.zytrax.com/tech/layer_1/cables/tech_rs232.htm#null_db9 for more info.
  20. JockeK

    How to access/download external file

    Try the urlread function.
Back
Top