Respondida
how to fetch files from each sub directory?
Use the _dir2_ function. With it, you can fetch files recursively.

más de 12 años hace | 0

Respondida
Find a series of consecutive numbers in a vector
my_array = [34 35 36 78 79 80 81 82 84 85 86 102 103 104 105 106 107 201 202 203 204]; my_num = 0; consec = 1; for k...

más de 12 años hace | 2

Respondida
how to use dir2 function in matlab?
If you just downloaded the function _dir2_ and place it in a location whose path is added to the system, it's bound not to work....

más de 12 años hace | 0

Respondida
How can I download an earlier version of matlab?
You should contact a mathworks sales agent. They will give you a solution. Anyway, I would recommend you to update your OS inst...

más de 12 años hace | 0

Respondida
fopen and xlswrite error
close the file before attempting the its opening: fod = fopen(outputfile,'w'); fprintf(fod, '%s \t%s \t%s \t%s \t%s \t%...

más de 12 años hace | 0

Respondida
how to access a particular format files from a drive location?
try the function given in the following link for recursive search: <http://www.mathworks.com/matlabcentral/fileexchange/40016...

más de 12 años hace | 0

Respondida
Too many input arguments-ga mixed integer optimiazation
Instead of using _optimset_ to set the options use _gaoptimset_.

más de 12 años hace | 0

Respondida
Save GUI axes .jpg (cut-off)
Use _print_ instead: print('-dpng',your_fig_name); or in jpg format: print('-djpeg',your_fig_name);

más de 12 años hace | 0

Respondida
RGB 2 L*A*B*
LAB (:,:,1) can have values above 100. See if the following code (taking from matlab documentation) works on your machine: ...

más de 12 años hace | 0

| aceptada

Respondida
Can you set the name for a fit when you call the cftool(x,y) gui?
You can not do it with _cftool_, but you can code it instead usign _fit_, like this: Fit = 'my_fit'; [xData, yData] = pr...

más de 12 años hace | 0

| aceptada

Respondida
plotting two vectors on same graph
Scale the array with smallest range, like in this example: Not scaled data: x=1:500; y=rand(500,1); plot(x,y) h...

más de 12 años hace | 0

Respondida
How do you type the future value annuity formula?
P = periodic_payment; r = rate_of_period; n = number_of_periods; FV_of_Annuity = P*( ( (1*r)^n-1 )/r );

más de 12 años hace | 0

Respondida
What's the problem in my loop?
Your code should go like this: A=imread('cameraman.tif'); B=zeros( size(A) ); for j=1:size(A,1) for k=2:(size(...

más de 12 años hace | 0

| aceptada

Respondida
Leave the whole for-loop
The _break_ command exists the most inner for/while loop. For nested for loops, you have to set a flag so that when it is active...

más de 12 años hace | 0

Respondida
problem with binary code
In your case, the relative frequency of the sequence: 0 0 1 1 is 0,0701754385964912 Then,it means that if you take your ...

más de 12 años hace | 0

Respondida
Can we get a handle of any .exe file running in Windows using m-scripts ?
Generally speaking, it is NOT always possible. But it all depends on the way the other interface was programmed.

más de 12 años hace | 0

Respondida
Problem in function handling using callback functions GUI
You say your GUI has an edit box and a push-button, you should have a callback function for each object in your GUI, then, the c...

más de 12 años hace | 2

Respondida
add vertical lines to an image
The following draws a vertical line on your_image from pixel (20, 10) to pixel (20, 50): image(your_image); hold on x...

más de 12 años hace | 0

Respondida
how to call path location in global to a function in matlab?
Since _add_ is a matlab built-in function, you should not use it to name your own functions. If path_01 and path_02 are const...

más de 12 años hace | 0

Respondida
How can convert .mdl to .m
To go from your simulink model to a m-file you have to re-write your model into matlab code. There is not a command to transform...

más de 12 años hace | 0

Respondida
Stuck with one program
I wrote the first part of your exercise, try to do the rest yourself: Fm = input('value of Fm? '); T = input('value of T...

más de 12 años hace | 0

Respondida
DC Motor Drive thru Serial port using MATLAB
The commands to send through the serial port to control your DC motor shoud be in the motor data-sheet. Every piece of hardware ...

más de 12 años hace | 0

Respondida
how to access a particular format files from a drive location?
The following will return a struct containing the .zip files in the folder specified by _path_to_zip_files_: my_zips = di...

más de 12 años hace | 0

Respondida
how to make unzip faster in matlab?
You can try something like this: my_zips = dir('*.zip'); for k=1:numel(my_zips) tmp_str = horzcat('unzip ', my_zi...

más de 12 años hace | 0

Respondida
How to "save as" a processed graph as a .txt data file?
If you put your data into a cell array, you can easily save it into a .txt file using _dlmcell.m_ from fileexchange: < http...

más de 12 años hace | 0

Respondida
how to make unzip faster in matlab?
You can use external software with " ! ", if you use _unzip_, then, call it this way: ! unzip your_file.zip

más de 12 años hace | 2

Respondida
two listboxes in a GUI
To set the list of numbers on the your list2, this has to be done by setting the 'String' property of list2. The list of element...

más de 12 años hace | 0

| aceptada

Respondida
LISTBOX, PLEASE HELP ME WITH THE LISTBOX
The array has to be transformed into a cell arrary: a=1:1:10; b=num2cell(a); Then, send it to the popup menu: se...

más de 12 años hace | 1

| aceptada

Respondida
Control simulink model with Matlab
Use the _set_param_ function. For a model called _test_, with a constant block named "Constant_2" on it, you can use: my...

más de 12 años hace | 0

Respondida
how do i vectorise given code?
If X is your matrix, here is how you get a 4x4 cell array out of your original matrix: X = rand(20); Y = mat2cell(X, rep...

más de 12 años hace | 0

Cargar más