Answered
Can I have round corners with PATCH?
You can with polyshape, h=polybuffer( polyshape([7 7 5 5], [5 7 7 5]),0.5); plot(h,'FaceColor','r', 'FaceAlpha',0.5)

4 years ago | 0

| accepted

Answered
How to take the fft of a sum of exponentials?
If your exponentials span too many orders of magnitude, you will probably have numerical problems, but otherwise, this is how I ...

4 years ago | 1

Answered
How to solve this undefined problem?
I also have try adding n = p The error message says that p is undefined. Therefore, you should be doing p=n.

4 years ago | 0

Answered
Linear System Solve in MATLAB
So, I have n (let's say around 200) equations...I am worried if the sequential solve would be very slow when comapred against t...

4 years ago | 2

| accepted

Answered
Why do I get "no solution found" in fsolve while there is the actual value for them?
Your function is discontinous and non-differentiable (due to discontinuities in ala() and non-differentiabilities in abs(0), whi...

4 years ago | 1

Answered
Create help for method with arguments
function [m,s] = twoStats(x) % Test for help % %Arguments: % - x: Argument 1, the array to calculate statist...

4 years ago | 0

Answered
how to shift trapped zeros to the bottom keeping leading zeros in given matrix fixed?
A=[ 0 0 0 1 0 2 3 1 2 3 0 0 0 1 2 2 1 1 2 3 ...

4 years ago | 1

| accepted

Answered
How do I use a parfor loop to run multiple versions of the same program with varied parameters?
I am trying to run a MATLAB program which will run several versions of the same program at once with varied parameters For that...

4 years ago | 0

| accepted

Answered
How to save the last four iterations in a for-loop
One way: for i = 1:100 a(max(i-96,1)) = b + 4 ; end

4 years ago | 0

| accepted

Answered
How to find the corresponding value of an element in same row, but different column?
[elements,row]=unique(data(:,13)) element_timestamps=data(row,1)

4 years ago | 0

| accepted

Answered
Optimization With Genetic Algorithm. Could not define objective Function!
1: But further in the constraints section i need decision variables as a matrix so i can write my constraints. ( Because they a...

4 years ago | 0

Answered
How to store rows of matrix into cell array?
tab = magic(5); v_r=num2cell(tab,2)

4 years ago | 1

Answered
Make 256by 256 by for loop
b=repmat(linspace(0,1,128),128,1); e=ones(size(b)); I=[b, e;e,fliplr(b)]; I(116:140,116:140)=0; imagesc(I); colormap(gra...

4 years ago | 1

| accepted

Answered
How to change the appearance of the boxplot with a whiskers?
A = [1.128 0.701 0.562 0.469 0.836 0.644 0.510 0.535 0.528 0.585]'; B = [0.630 0.630 1.079 0.635 0.983 0.875 0.747 0.811 0.878 ...

4 years ago | 2

| accepted

Answered
fit() from Curve Fitting Toolbox not working even with examples from the documentation
Run the code inside a function, >> myfunction function myfunction load franke sf = fit([x, y],z,'poly23') p...

4 years ago | 0

| accepted

Answered
Identify neighbours in image after finding regionprops centroids
I would create a polyshape for each of the regions based on the extrema that you found. You can dtermine whether 2 polyshapes p_...

4 years ago | 0

| accepted

Answered
How do I only delete NaNs that exist after a number but not before?
I would like to delete all NaNs that only exist after numbers As other's have told you, you cannot replace a matrix element wit...

4 years ago | 0

| accepted

Answered
Total lines of code of MATLAB product
I've seen geneal estimates that there 57e3 lines of source code per MB of object code. My app folder C:\Program Files\MATLAB\R20...

4 years ago | 0

| accepted

Answered
Fitting data with a exponentially modified gaussian equation
Because you are using a custom model, you need to supply an initial guess of the parameters under "Fit Options". Otherwise, the ...

4 years ago | 0

Answered
Get tangents (+ linear equation of tangents) of turning points in cfit graph
p=flip(coeffvalues(ft)); dp=polyder(p); ddp=polyder(dp); dddp=polyder(ddp); %3rd derivative r=roots(ddp); turingpoint...

4 years ago | 1

| accepted

Answered
How to optimize parameters that satisfy the equation.
First, you must fix the formula for f f = abs( 0.24 - abs(x*(0.05*y*exp(1i*z) + 0.02)) ); Second, you have 3 unknowns, so you ...

4 years ago | 0

| accepted

Answered
Jacobian Function in MATLAB
Do not give variables the same name as the function they are declared in. You have a variable named 'Jacobian' inside a function...

4 years ago | 0

Answered
How do I find the handle to the colorbar for a specific axes
Here is an excruciatingly roundabout method. function [Hcb,tf]=getColorbars(hAxes) %Return colorbar handles for axes with co...

4 years ago | 0

Answered
Creating a variable with the values in the same fields of different structures
Well, I won't give you a solution that creates separate variables, since there are standard hazards associated with that. Howeve...

4 years ago | 0

| accepted

Answered
A bit of MATLAB syntax fun
Unrecognized function x?

4 years ago | 0

Answered
How to combine multiple curve fits in one plot?
Use the cftool to export each fit to a workspace variable cfit1 and cfit2. Then plot(cfit1,Varname1,y); hold on plot(cfit2,Va...

4 years ago | 2

Answered
Fast Euclidean Distance Calculation
vecnorm(X-Y,2,2);

4 years ago | 1

Load more