Answered
What is wrong with this code? Need help.
y=diff(x(m,n,1))/dt; %% Error Message at this line: Index exceeds matrix dimensions Yes, see the reason: >> m m = 2...

7 years ago | 0

Answered
Gray2bin conversion
How to get graycode values for K? K=[1 2 0 9]; K_1=dec2bin(K); K_2=bin2dec(K_1)

7 years ago | 0

Answered
How to draw horizontal lines on set of images
Images=dir('C:\complate_path\folder_name\*.tif'); outDirectory='C:\complate_path\folder_name_to_save\'; for i=1:length(Images)...

7 years ago | 0

| accepted

Answered
store which iterations that the error took place
l=1; error_iter=[]; for i=1:iter % do operation if error %error condition error_iter(l)=iter l=l+1; end end error_iter...

7 years ago | 0

Answered
separating r g . b's from a colour image
You are doing right. im = imread('forest.jpg'); r_plane=im(:,:,1); g_plane=im(:,:,2); b_plane=im(:,:,3); subplot(311),imsho...

7 years ago | 0

| accepted

Answered
Error using for loop with transfer function
num=25; i=1; cell_data=cell(1,6); for eta=0:0.2:1 den=[1 2*eta*5 0]; G=tf(num,den); H=feedback(G,1); cell...

7 years ago | 0

| accepted

Answered
Get coordinates of edges - Image Processing
Lets say image_test is the output binary image (After Roberts Method) data=corner(image_test); r_data=data(:,1); c_data=data(...

7 years ago | 0

| accepted

Answered
How to Split one Large Matrix Into Smaller Matrices
What would be the best way to go about taking my currently ugly data and putting it into a usable format? One Way: data_file=...

7 years ago | 0

Answered
problem in creating function
First you have to create the function and save in different Matlab file, the file name must be same as function name, in your ...

7 years ago | 0

| accepted

Answered
Plotting all the columns of a matrix
I want to plot columns of two matricesZ_imag and Z_real in two separate graphs. I assumed, stack bar plot of individual colu...

7 years ago | 0

| accepted

Answered
find specific value from each row from matrix (Index, and number)
I need to obtain only in each row if there is a number lower than 4 or not, I need both the index, and the real value X=magic(...

7 years ago | 0

Answered
Solve systems of linear equations Ax = B for x
ans = 0.9000 1.7000 How to find 0.9 and 1.7 exactly?? format shortg; A =[1 3 4 2]; b= [6 ;7]; A\b R...

7 years ago | 0

Answered
Can I draw the figure with the help of MATLAB code ?
Please note: I have done the Jugaad here. I have no idea what the plot represents? I tried it for 10 minutes, hence I posted i...

7 years ago | 1

Answered
3D Array Multiplication with 2D Matrix
data1=rand(500,10,32);% 3D Array data2=rand(1,500); %1x500 mat result=data1(1:500,1,1)*data2; %Multiplication

7 years ago | 1

| accepted

Answered
how to generate absolute difference between two different histograms
data1=randi(100,1,100); % Just an example data2=randi(100,1,100); % Just an example diff=abs(hist(data1)-hist(data2)); resu...

7 years ago | 0

Answered
Detection Rate Equation formal
Both are true, but represents the two different terms True Positive Rate: TP / (TP+FN); True Negative Rate: TP / (TP+FP); ...

7 years ago | 0

| accepted

Answered
several initial conditions in a loop
One way % Define Intital conditions % or load in txt/exel file num_iter= ?? % Define for i=1:num_iter % Call the different...

7 years ago | 0

| accepted

Answered
Using fprintf for complex numbers
One Way: Z1= sqrt(3) * exp((pi*i)/4) fprintf('%f + %fi',real(Z1),imag(Z1)) More: Z1= sqrt(3) * exp((pi*i)/4); Z2= 2 * exp((...

7 years ago | 1

| accepted

Answered
Generate random numbers in a loop and then store them
First question, is there a code that store non-zeros rows? See this example: A=randi(10,2,4); A(3,:)=0; % Store Non Zero row...

7 years ago | 1

Answered
issue in niqe function
May be, you are using the Matlab version before R2017b This function Introduced in the year 2017b

7 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals with minimum and maximum values
Change the variable name min and max to different one say min1 or max1 min(:)=[y1min y2min y3min] max(:)=[y1max y2max y3max]

7 years ago | 0

| accepted

Answered
Reflecting a Curve on a Graph
x=0:0.5:10; y=exp(2.*x/3); plot(y); Set the scale range (values) as per requirements

7 years ago | 1

Answered
Write a script that given a vector, called A, of n numbers, outputs the index of the first number divisible by 3. Sample Output: Given A = [5, 4, 6, 7, 3] divisible by 3 is:3
A = [5, 4, 6, 7, 3]; idx=find(mod(A,3)==0); % Gives the index number / Position disp(A(idx)); % Gives the those idx number in ...

7 years ago | 0

| accepted

Answered
How to make a loop
"with this format, the matrix considers all the values ​​for me, but I only need those that fall in length n" x=(0:1:100); n=i...

7 years ago | 0

| accepted

Answered
Sensitivity Analysis for a linear model
"I am trying to understand how certain parameters affect the ouput in the code attached. I want to understand how changing one p...

7 years ago | 0

Answered
how can i Identify similar or identical images
Use SSIM and Matlab documentation SSIM here OR If Images are gray Images, you may use subtract from each other, minumum subtra...

7 years ago | 0

Answered
Help in image processing - how to count the number of black shapes on white image
gray_image=imread('3.bmp'); % Improve the Thresholding to get more accurate answer % Here I have used Global image threshold u...

7 years ago | 0

Answered
Square matrix input, output same elements in upper right triangle
>> magic(6); >> triu(ans); Here B=[-6 0 4; -2 8 3; 7 0 1]; result=triu(B) Also, you can do the same in multiple ways (witho...

7 years ago | 0

| accepted

Answered
Problem in plotting the string variable
Rough_y=[4;5;8;3;12;14;9;11;17;17;11;14;19;25;15] Station=['a';'b';'c';'d';'e';'f';'g';'h';'i';'j';'k';'l';'m';'n';'o'] plot(R...

7 years ago | 0

Answered
Plotting 3D of Bessel equation using Matlab
Use this custom function

7 years ago | 0

Load more