Answered
How can I keep figure boxes from popping up while running script.
Are you wanting to save the plot created on each pass of your loop? If so, just move the figure creation line out of the loop. A...

nästan 11 år ago | 0

| accepted

Answered
how can i add noise to the image??
Do you have the image processing toolbox? If so, you might find *imnoise* useful. http://www.mathworks.com/help/images/ref/im...

nästan 11 år ago | 0

Answered
Can a function inside a parent code access the full workspace of that parent code?
A nested function can access the variables stored in the workspace of its caller function: function x = outer_function(a,b)...

nästan 11 år ago | 1

| accepted

Answered
How to include a conditional function inside a "for k = 1 : 200" loop?
Yes, you need to pass the k value, and any other values used from the calling function, into your function that you call within ...

nästan 11 år ago | 1

| accepted

Answered
how can store string and number in a matrix?
You can use a cell array for storing values of differing datatypes: A = {'matlab' 'ver' 12} You can also use a cell array ...

nästan 11 år ago | 0

Answered
Is it possible to configure data in a excel file from matlab? If so, How can I do it?
Do you want the timestamp (22:57:13) to be split into separate rows or placed all in the same column? Either way, a combinati...

nästan 11 år ago | 0

Answered
Need help inproveing function...
Does this do what you want? >> x = [1 1 3 5 4 6 6 1 9 1 1 8 2 5 5 5 2 7 7 2 2 2]; >> idx = cumsum([1 diff(x) ~= 0]); ...

nästan 11 år ago | 0

| accepted

Answered
How to open an axes object inside a GUI ?
If you're asking if this sort of functionality is available without doing your own coding when interacting with axes in figure w...

nästan 11 år ago | 1

| accepted

Answered
export output from a linear regression to Excel
You could store your data in a cell array where the first row of elements are the headings (coefficients, r^2, etc.). Then that ...

nästan 11 år ago | 0

| accepted

Answered
when using genetic algorithm, the number of variables(nvar) is dependant on the row vector(x) that my fitness function accepts. How can I deal with that?
Have you looked into the *varargin* function? help varargin You could then parse the arguments contained within varargin...

nästan 11 år ago | 0

Answered
Help finding the sum of neighboring elements in a matrix?
A 2D convolution should work for your purposes: help conv2 To sum elements, just make your filter a matrix of ones. You...

ungefär 11 år ago | 2

Answered
nested if else statements
x = 5.5 if x > 6 disp('x is greater than 6') elseif x >= 3 && x <= 6 if mod(x,1) ~= 0 ...

ungefär 11 år ago | 4

| accepted

Answered
GigE Camera Error: Unable to set PacketSize
Have you tried setting the Packet Size property for your camera? Outside of matlab, you should make sure Jumbo Frames are enable...

ungefär 11 år ago | 0

Answered
summing up array element
help cumsum >> s = cumsum(p) s = 3 9 11 16

ungefär 11 år ago | 1

Answered
How to find specifying pattern in the string
It sounds like *regexp* would do what you're wanting. idx = regexp(s,'V[bx]x_') If idx returns anything other than empty...

ungefär 11 år ago | 2

Answered
ln not recognised as a command
help log If you read the help file for *log*, you'll see that it _is_ the natural logarithm function. *ln* is not a built-i...

ungefär 11 år ago | 2

Answered
Determine if a value is an Empty Matrix: 0 x 1 and replace with NaN
help isempty Your code would look something like this: if l == 1 fint = intersect(find(b(:,1)==k),find(b(:,2)==...

ungefär 11 år ago | 1

| accepted

Answered
GUI table, add/remove row buttons
Here's a snippet of code I've used in the past for adding and subtracting rows. I modified it for use with a pushbutton. This as...

ungefär 11 år ago | 0

| accepted

Answered
Adding fields to struct within variable editor
From within the variable editor window: Right click -> New Then modify the field's value to whatever you like.

ungefär 11 år ago | 0

| accepted

Answered
Puzzler for a Monday
Here's my solution. It's ugly, but I think it's fairly general. :P function A = cell_shuffle(A) idx = cellfun(@(x)iseq...

ungefär 11 år ago | 0

Answered
Repeat Try/Catch loop?
You could embed your try/catch statements in a while loop, then check a condition at the beginning each iteration to see if the ...

ungefär 11 år ago | 9

| accepted

Answered
How to assisgn char data into empty Edit Text in Matlab GUI ?
Assuming you created your GUI using GUIDE: set(handles.edit1,'String',scale)

ungefär 11 år ago | 0

| accepted

Answered
Attempt to reference field of non-structure array
You need to remove ".txt.", as your test file isn't loaded in as a structure and Matlab is interpreting the period as referencin...

ungefär 11 år ago | 3

| accepted

Answered
How to call a property?
Does the following work? newVar = fit.Variance;

ungefär 11 år ago | 1

| accepted

Answered
Plotting a 3-D Function with Interpolated Shading
[X,Y] = meshgrid(linspace(0,1,25), 0:.024:0.5); Z = cos(2*pi*(3.*X - 4.*Y)) ...

ungefär 11 år ago | 1

| accepted

Answered
How can i compare 2d shapes in mat lab?
In the below example, I'm assuming that you're going to be working with RGB data. That is, I'm assuming that your images aren't ...

ungefär 11 år ago | 0

| accepted

Answered
Moving between different GUI's (bypassing any intermediate GUI)
Others may be able to comment on the best way to do this using appdata. I have found, however, that simply passing the handles s...

ungefär 11 år ago | 0

Answered
update GUI from from call back
Does this do it? set(handles.listbox_handle,'String',contents{handles.Selection}) Also, I'm fairly sure that you don't n...

ungefär 11 år ago | 0

| accepted

Answered
Why does Matlab display different pixel values than other programs?
Shot in the dark here, but could it have anything to do with those programs using 0 indexing while matlab uses 1 indexing? Paint...

ungefär 11 år ago | 0

| accepted

Answered
Plotting matrix coordinates with indices?
If I understand correctly, I think *imagesc* would work: M = eye(50); %example matrix imagesc(M)

ungefär 11 år ago | 0

Load more