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

oltre 7 anni fa | 3

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 3

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

| accettato

Risposto
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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 3

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

oltre 7 anni fa | 2

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

oltre 7 anni fa | 1

Risposto
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

oltre 7 anni fa | 2

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 2

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

Carica altro