Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. lurad75

    help :how to implement do while loop in matlab

    Hi, I don't think that exists a do-while in matlab, but you can use this treak temp = 1; while ( temp | condition ) temp = 0; ... ... end In such a way the first cycle is always true but from the second you remain in the while loop only if your condition is verified. I don't know your...
  2. lurad75

    Matlab arrays

    Sorry for my late! There is an error in my code... This is the right files = dir('C:\Datasets\Number_of_Frames\*.mat'); d={}; for i=1:length(files) eval(['d{' int2str(i) '}=load(files(' int2str(i) ').name);']); end Hi Gianluca
  3. lurad75

    Matlab arrays

    Hi, If I've weell understood your problem you can use the cell array in such a way files = dir('C:\Datasets\Number_of_Frames\*.mat'); for i=1:length(files) d={}; eval(['d{' int2str(i) '}=load(files(' int2str(i) ').name);']); end d is a cell array that contains all your frame_i array...
  4. lurad75

    Random generation...

    Hi, to generate an array of length X you can use: rand_seq = rand(1,X); This distribution is a continous uniform distribution from 0 to 1 with mean value 0.5. If you want to create any uniform distribution you can use rand_seq = V*rand(1,X) + Offset; In this case V*rand(1,X) generates a c.u.d...

Part and Inventory Search