已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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)...

11 years 前 | 1

| 已接受

已回答
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 ...

11 years 前 | 1

| 已接受

已回答
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 ...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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]); ...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 1

| 已接受

已回答
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 ...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 2

已回答
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 ...

11 years 前 | 4

| 已接受

已回答
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...

11 years 前 | 0

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

11 years 前 | 1

已回答
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...

11 years 前 | 2

已回答
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...

11 years 前 | 2

已回答
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)==...

11 years 前 | 1

| 已接受

已回答
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...

11 years 前 | 0

| 已接受

已回答
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.

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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 ...

11 years 前 | 9

| 已接受

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

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 3

| 已接受

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

11 years 前 | 1

| 已接受

已回答
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)) ...

11 years 前 | 1

| 已接受

已回答
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 ...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

| 已接受

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

11 years 前 | 0

加载更多