Answered
Handle a .csv file and save folder path
If you want to save the file to a particular directory (i.e. the desktop) then you could do something like the following di...

12 years ago | 0

Answered
file data error reading
You mention that line eight should be skipped - is that because there is only one number in that line? Are valid lines only tho...

12 years ago | 0

Answered
How to write m file code in GUI
Similar to your code above, you will need to add two callbacks to the GUI. In the GUI editor, from the menu, select *View-->Vie...

12 years ago | 0

| accepted

Answered
Get values from several edit boxes using a push button in GUI?
There should be a callback function for your button that will fire whenever the user presses it. The callback (in its default s...

12 years ago | 1

| accepted

Answered
Finding indices in a magic 5x5 matrix in which the values are greater than 20?
While the initialization of the magic *A* matrix is correct, the code that follows is unclear. Why the second initialization of...

12 years ago | 0

| accepted

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

12 years ago

Answered
matlab error, Undefined function or variable 'funczaro01'.
Erick - your above code should be formatted to make it more readable or it can be attached to your question. The function def...

12 years ago | 0

| accepted

Answered
ASCII STL to image
This is a neat question. I'm not sure if you tried this or not, but a first step might have been to test out the stl to make su...

12 years ago | 2

| accepted

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

12 years ago

Answered
how do i load dll files with loadlibrary function?
Check out the documentation for *loadlibrary* at <http://www.mathworks.com/help/matlab/ref/loadlibrary.html>. Your line of code...

12 years ago | 2

Answered
How to pass data from .m file to GUI ?
I see the concern…you have a callback in the analog output object, *add_to_buffer* that, when invoked, you want to update the GU...

12 years ago | 3

| accepted

Answered
How to capture time interval between two keypress.
In your first function, you are using the *cputime* command which, according to the documentation - type *help cputime* in the c...

12 years ago | 0

| accepted

Answered
how to count bit error
If you are trying to count the number of samples that have changed in the audio file before and after steganography, then why no...

12 years ago | 0

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

12 years ago

Answered
How to read multiple images from a folder, perform a function and store all the values one by one in an array form?
Suppose you have 99 images and you want to process each one and save the results n = 99; % number of images stats...

12 years ago | 1

| accepted

Answered
How to do manual thresholding using the set of images?
If you put a breakpoint at line 239 set(h_ax1, 'AlphaData', bw); you will observe that *bw* will have the same dimensions...

12 years ago | 1

| accepted

Answered
How to recursively add fields in a structure.
How are you concatenating the fields? If I run *nelsonfit* with two different sets of inputs, the function returns two structur...

12 years ago | 0

| accepted

Answered
How do I use for loop to crop an image 4 times?
A for loop isn't really necessary. The centre of the image is at row 2848/2=1424 and column 4288/2=2144, and this centre (coord...

12 years ago | 1

Answered
How do i use the edit text box in a GUI to change variables in a function that i run with the gui???
If we assume that your GUI has two edit text boxes, one for *Ss* and one for *SR*, then, in the above button callback, you can g...

12 years ago | 1

| accepted

Answered
How to save only latest ~10 iterations on for loop
If you are only interested in the latest 10 matrices, then you can create a "circular" cell array of fixed size that is updated ...

12 years ago | 1

| accepted

Answered
Multi Subplot for loop
The above code keeps referring to the same subplot on each iteration since it is using *i/2* for each *i* in either *subplot1 = ...

12 years ago | 2

Answered
Want to run the code for n values of X0, tried using for loop but didn,t get desired output.how to run for n values of X0?
If *X0* varies from 0 to 10 (and we assume a step size of 1), then a *for* loop could be introduced as follows X0data = 0:1:...

12 years ago | 0

| accepted

Answered
How can I display results of my function onto a toggle button?
I think that you almost have the code to do that, it is just that you are updating the *edit4* text widget rather than the butto...

12 years ago | 0

Answered
CSV import with variable column headers
Rather than creating *n* variables for each column of data, why not just create a mxn matrix where *n* is the number of columns ...

12 years ago | 1

Answered
Quantization erorr in audio steganography
Muhammad - in some cases, rather than embedding the code for your function in the question body, it would be preferable to attac...

12 years ago | 0

| accepted

Answered
How to transfer a callback function of one pushbutton to other?
Rather than saving the path to the image to the *handles* structure like handles.Browse_image=fullfile(direc,filename); ...

12 years ago | 0

Answered
any logic to do this programming on random number
From the set of 1000 random numbers, you could do something like the following % generate the random numbers r = 0.36+0.1*...

12 years ago | 0

| accepted

Answered
TIF image not reading and displaying correctly, displaying as black
The problem seems to be that the image data is uint16 and the maximum value across all dimensions is no more 255: >> I = imr...

12 years ago | 2

| accepted

Answered
load large data set from text file
If you have an idea on how many valid lines are in the text file, then you could consider pre-allocating memory to the *data* ma...

12 years ago | 0

Answered
How do I convert a cell array whose dimensions are not equal?
Check out the documentation for *cell2mat* at <http://www.mathworks.com/help/matlab/ref/cell2mat.html> and in particular the exa...

12 years ago | 1

| accepted

Load more