Respondida
I am getting the following error:
The real fix is to prevent a function to add the system32 folder in the first place, but the code below is the temporary fix to ...

más de 7 años hace | 3

Respondida
What does guidata do?
It actually works as you described it Guidata stores a struct to your GUI, or loads a saved struct. If you make changes you nee...

más de 7 años hace | 1

| aceptada

Respondida
bar() to a specific axes in GUI
You should always use explicit handles. You could indeed use the code you describe (which you would then need to put just before...

más de 7 años hace | 1

| aceptada

Respondida
How do I fit a nonlinear function correctly in matlab
I don't have the toolbox that contains the fitnlm so I'm using fminsearch instead: data=[... 0.0037071 0.5 0.015203 ...

más de 7 años hace | 3

Respondida
How to replace zero elements with the mean of the closest previous and following values?
The code below doesn't average the non-zero above and below for each row, but gets the closest non-zero, with a bias towards the...

más de 7 años hace | 1

| aceptada

Respondida
How do I compute RMSE for Color Image ??
If the function you are using is from this FEX submission, then yes, it will work. The interpretation of the RMSE might be more ...

más de 7 años hace | 0

| aceptada

Respondida
can anyone please provide me the source code for SPIHT algorithm
If I search the web for SPIHT Matlab this FEX submission is my first hit: link

más de 7 años hace | 0

| aceptada

Respondida
Hatched fill pattern using colormap
applyhatch_pluscolor from the FEX should do this. Despite the lack of recent updates, judging by the comments it should still wo...

más de 7 años hace | 1

Respondida
How do I fix this
You are using t as an index to m_t, but that contains negative values. (in the call to trapz) I suspect you want to run the lin...

más de 7 años hace | 0

| aceptada

Respondida
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
If a question is closed, you cannot write a comment anymore. E.g. this question was already closed, but since it was the first q...

más de 7 años hace | 0

Respondida
I have a code but it keep saying "invalid expression. when calling a function or indexing a variable, use parentheses. otherwise check for mismatched delimiters.
You are using square brackets for the sin function, instead of parentheses. Also, you were missing a lot of * signs. You should ...

más de 7 años hace | 3

Respondida
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Since the new editor has become way more fancy: A while back I read in some help page for the Answers forum that a referrence t...

más de 7 años hace | 2

Respondida
Converting the program to the GUI version
There are many ways to share data between callbacks. In the context of GUIs the most often used function is guidata. You can al...

más de 7 años hace | 1

Respondida
Hi there, I need to create a code that can replace the diagonal values on a matrix with 0's..
A=rand(5,5); A(size(A,2):(size(A,2)-1):(numel(A)-1))=0

más de 7 años hace | 2

Respondida
Using xlsread in a for loop
If the worksheet names are 0.600 etc you can use the code below. B=struct; for n=20:-1:1 A= xlsread(filename,spri...

más de 7 años hace | 1

Respondida
How to calculate 3D Positions using the distance from 3 separate points in space?
You could use something like the code below. It uses only base Matlab functions to search a position where the radii of your mea...

más de 7 años hace | 0

| aceptada

Respondida
it says it has an untitled error in line 6 which i think it's about clause of if
You made the mistake of using |i| and |j| as variables and you forgot to initialize |j|. Also, think about what this code doe...

más de 7 años hace | 0

| aceptada

Respondida
How can I calculate the area between two curves?
The |polyarea| function handles this just fine. figure(1),clf(1) x=0:1500; y1=@(x)(100./0.93).*(((x./19).^(10))./(1+(...

más de 7 años hace | 0

| aceptada

Respondida
is it possible to write a code that experiments with zero mean Gaussian noise for a variance in the range 0.001 to 0.1
Yes, this is what for loops exist for. variance_list=.001:.001:0.01; for k=1:numel(variance_list) J = imnoise(MEANPIC...

más de 7 años hace | 0

| aceptada

Respondida
How to change elements in several arbitrary positions at the same time
You can use the |sub2ind| function (I used the |bsxfun| function to generate the row numbers) A=[0 0 0 0; 0 0 0 0; 0 0 0 0]...

más de 7 años hace | 0

Respondida
MATLAB integer to roman numeral
I wouldn't hard-code the combinations, but use the rule instead. My proposal would look something like this: # convert the ch...

más de 7 años hace | 1

Respondida
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
|find| is not guaranteed to result 1 value. It might return a vector, or an empty array. If you are certain there will always be...

más de 7 años hace | 0

Respondida
Finding the index of a matrix corresponding to a particular column of another matrix
You can try this: A= [4 12 ; 2 6]; B = [9 4 8 12 ; 2 2 4 6]; selected_col=1; col_in_B=find(all(A(:,selected_col)==...

casi 8 años hace | 1

| aceptada

Respondida
Finding R squared in a loop
Just a quick note: a negative R-squared is actually possible. It just means your fit is so bad it is even worse than using the m...

casi 8 años hace | 2

Respondida
Keep prompting user instead of hitting run each time.
You can wrap your code in a while loop, but that will force the user to hard-break out of your code (ctrl-C on Windows). A nicer...

casi 8 años hace | 1

Respondida
How can I create 3D pixels image
The code generating the binary mask is relatively easy to extend, but you'll have to think about the image format you want to sa...

casi 8 años hace | 1

Respondida
Gui appears and disappears before user can do anything with it
It is not because the figure is not visible yet, but because the GUI figure is not a callback figure at that point (at the most ...

casi 8 años hace | 0

| aceptada

Respondida
Calculate residuals as a single number in lsqnonlin function
Yes, the sum of squares or the RMS: SSq=sum(res.^2); RMS=sqrt(mean(res.^2)); The downside of using the plain sum is t...

casi 8 años hace | 1

Respondida
Call OpeningFcn each time a button is pressed
There are two strategies I described: # Have a function that you call at the end of |OpeningFcn|. That function only call |ui...

casi 8 años hace | 0

| aceptada

Respondida
i have used dwt2 function for my input image? for approximation level i am getting blank image. what sould i do ?
Your image is not white. |imshow| assumes your data is scaled from 0 to 1 if it is a double, while your data is clearly not from...

casi 8 años hace | 0

| aceptada

Cargar más