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

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 2

Risposto
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....

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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%...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

Risposto
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: ...

oltre 12 anni fa | 0

| accettato

Risposto
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...

oltre 12 anni fa | 0

| accettato

Risposto
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...

oltre 12 anni fa | 0

Risposto
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 );

oltre 12 anni fa | 0

Risposto
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(...

oltre 12 anni fa | 0

| accettato

Risposto
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...

oltre 12 anni fa | 0

Risposto
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 ...

oltre 12 anni fa | 0

Risposto
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.

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 2

Risposto
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...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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 ...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Risposto
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

oltre 12 anni fa | 2

Risposto
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...

oltre 12 anni fa | 0

| accettato

Risposto
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...

oltre 12 anni fa | 1

| accettato

Risposto
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...

oltre 12 anni fa | 0

Risposto
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...

oltre 12 anni fa | 0

Carica altro