Answered
Get (automatically) position of pixels that are white in my binary mask image
"Get (automatically) position of pixels that are white in my binary mask image" Let suppose im1 is a binary image [r c]=find(i...

6 years ago | 0

| accepted

Answered
How to solve "Index exceeds the number of array elements (39)."
The problem is here z0Le(i) = z0LtW(i-1); x0Le(i) = x0LtW(i-1); When the loop iterate for first i=1, then, in the else state...

6 years ago | 0

Answered
Capture Matrix Results from For Loop for Plotting - MATLAB
How can this possible, you are trying to plot i vs x, where i is scalar (single value) and x is vector having length 3. x = -...

6 years ago | 0

Answered
vector is not overwritten after certain interation during loop
for a=1:n k=k0+num(:,a); stpx(a)= stpx_0+[stpx(k(1,1));stpx(k(2,1));stpx(k(3,1));stpx(k(4,1));stpx(k(5,1))]; stpy...

6 years ago | 0

Answered
graph cuts result produce two image
Your question is still not clear, but I am trying to answer In the code, "if condition" true, then only it shows first figure wi...

6 years ago | 0

| accepted

Answered
change initial condition with binary data in matlab
"change initial condition with binary data in matlab" Is this? Change here u(:,1)=randi([0 1],nx,1) And uk(:,2) =randi(...

6 years ago | 0

Answered
hello, how can I resolve this?
data=[2 1 2 1 2 2 4 1 2 3 8 1 2 4 16 1 2 5 32 1 2 6 64 1 2 7 128 1 2 8 256 ...

6 years ago | 0

| accepted

Answered
How to erode certain parts of an image
You can do that in multiple ways: result1=bwareafilt(binary_image,1); result2=~bwareafilt(~result1,9); imshow(result2)

6 years ago | 0

| accepted

Answered
How to draw ROC for 6 algorithms
See here to draw ROC %Draw the ROC of individual algo hold on;

6 years ago | 0

Answered
Best way to vary the threshold value of a greyscale image
Let say im is the gray image, assumed you are try to convert gray to binary % Define all threshold values here, you would like ...

6 years ago | 0

Answered
problem in plotting figure
In the line no 44, see both variable have different lengths, how can plot two different lengths vectors here plot(tvec,abs(z...

6 years ago | 0

Answered
Correcting blsprice(...) when I have negative foreign rate
[call, put]=blsprice(stock,strike,rate,time,volatility) See more details here

6 years ago | 0

Answered
Array of images indexing
Use cell array data={frame1,frame2,........} Frame is an image, you can same multiple frames in cell array. Its very easy to c...

6 years ago | 0

Answered
Creating 3D Plot using Surf
format long e n=1:1:5; m=1:1:10; alpha=0.01; A=zeros(length(n),length(m)); B=zeros(length(n),length(m)); f=zeros(length(n)...

6 years ago | 0

Answered
How can I plot points of different color shade each iteration?
One way: col=[define colors here]; % define colors in strings, like 'b','r'...see color in Matlab. % Define colors equal to ...

6 years ago | 0

Answered
I don't know what's wrong in this code, it doen't produce a graph.
IR(i)= (cos(beta(i)).^2).*(sin(alpha(i))./alpha(i)).^2; %..^ here inside for loop

6 years ago | 0

| accepted

Answered
for loop indexing per allocating
LA(t/0.1+1)=1.15-(5*t); %.....^ indexing value must be positive integer Just an examples : LA(0.02)>> Not allow LA(1)>> Allo...

6 years ago | 0

| accepted

Answered
Plotting multiple Values on one axis
num=[0.1, 1, 10, 100, 1000]; den=[1 0.1]; for i=1:length(num) G=tf(num(i),den); CIsys=feedback(G,1) step(CIsys) title('Ste...

6 years ago | 0

| accepted

Answered
how to find an optimal window size for moving averaging filter among several windows?
"then how to find an optimal window size for moving" As, average filter smooths the original image, its based on result on pari...

6 years ago | 0

| accepted

Answered
Imagesc of a sine wave
t=0:.01:10; %....^ change step size and see the results f=10; imagesc(sin(f*t))

6 years ago | 0

| accepted

Answered
Looping through a Matrix
mat=randi([0 2],[10,10]); % Just as an example result=mat+(mat==2)

6 years ago | 0

Answered
How can I truncate a random generated exponentail distribution?
I have to truncate this so number don't go below 1e-6 and above 0.2. Do you have any ideas? Is this? I am expecting the numb...

6 years ago | 0

Answered
Populating a matrix with user input
See the example: Get the data from inputdlg; Say any number 3, 4,5,6 ........ Then >> str2double(4) ans = NaN >> ...

6 years ago | 1

| accepted

Answered
how three vectors store in 3d array of zeros of same size with each vector's size
One way: data=zeros(4,1,3); v1=[1 2]; v2=[1 2 3]; v3=[1 2 3 4]; v1(length(v3))=0; % Because v3 having maximum length v2(l...

6 years ago | 0

Answered
Help me with this code
y=stat(x); % here n value reflects on y, Or You can keep the same output argument name, like n=stat(x);

6 years ago | 0

| accepted

Answered
If statement multiple condition overposing
Does anybody know why this is not working? NoncomplianceIndex=??? % Define may be as zero for i=1:length(time) if LeftFr...

6 years ago | 0

Answered
What does the following code do?
Here myFunction evaluates the value based on x myFunction=@(x)x^2-6; Say myFunction(2), here x=2 passes to function argument...

6 years ago | 0

| accepted

Answered
How to convert string or chars to string arrays withing for loop?
message ='SOMETEXT'; l=1; for i=1:4:length(message) result{l}=message(i:i+3); l=l+1; end result You asked for fo...

6 years ago | 1

| accepted

Answered
The best method to organize my data
cell array

6 years ago | 1

Answered
Without mod function and any loops(i.e for or while)
Here I have used one bitget function or without any function??? a=[3 4 5 6 8]; % Just an example data_odd=a.*bitget(a,1); ...

6 years ago | 1

| accepted

Load more