Answered
what is causing this error?
Note that in matlab the indexing shoul dbe always a posittive integer or a logical. You are suing negative number, so error. ...

7 years ago | 0

Answered
How to make overlaped 3 rectangle fill in color RGB (255/ make white)
R = [0 0 ; 1 0 ; 1 1 ; 0 1] ; figure hold on patch(R(:,1),R(:,2),'r') patch(R(:,1)+rand,R(:,2)+rand,'b') patch(R(:,1)+rand,...

7 years ago | 0

Answered
plot a snake graph
Play around with this: x = 1:100 ; y = 1:100 ; ind1 = reshape(y,5,[])' ; y(ind1(1:2:end,:)) = -0.5 ; y(ind1(2:2:end,:)) =...

7 years ago | 1

| accepted

Answered
element mean of matrices
A = rand(5,5,7) ; % some random data for demo iwant = zeros(7,1) ; % initialize the required for i = 1:7 Ai = A(:,:,i...

7 years ago | 0

Answered
save result in while loop
index_A=cell([],1); while (ibd <= max_it) i=i+1; index_A{i}= t ;% save what you want ; end index_A = cell2mat(i...

7 years ago | 1

Answered
How to combine string and numbers before using xlswrite to export data into an Excel file?
cruise = {'SE_01', 'SE_01','SE_01'}' ; Longitude = [-126 -123 -121]' ; Latitude = [35 31 27]' ; Year = [2017 2017 2017]' ; M...

7 years ago | 0

| accepted

Answered
Find the interval of an envelope corresponding to a specific peak after peak detection
Let (x,y) be your data. [val,idx] = max(y) ; x_max = x(idx) ; y_max = y ; Read about max

7 years ago | 0

Answered
Can I divide a linear array by a number which larger than its size ?
You interpolate your data into your desired size and then reshape. Read about interp1.

7 years ago | 0

Answered
How can blur an image
I = imread('peppers.png') ; for i = 1:3 I(:,:,i) = uint8(conv2(I(:,:,i),ones(20)/20^2,'same')); end imshow(I) ;

7 years ago | 0

Answered
Change dashed line spacing on plot
You may follow something like this: x = 1:100 ; y = rand(size(x)) ; % make dashed line with gaps idx = reshape(x,10,[])'...

7 years ago | 0

Answered
Create cell array from 00.00 to 23.59
t = 00.00:0.01: 23.59 ;

7 years ago | 0

Answered
how to combine multiple files contain one column only into one file only
files = dir('*.csv') ; N = length(files) ; A = cell(N,1) ; for i = 1:N data = csvread(files(i).name ; A{i} = data ;...

7 years ago | 0

Answered
how can I display a specific region in Africa ?
You have the folliwng options: Get the limits of your region and use xlim/ylim or axis Get the shape file of your intereste...

7 years ago | 0

Answered
Error using table (line 253) All variables must have the same number of rows.
The first input is a column and rest are rows..so the error. Try: table(step,Psi0',Psi1',Psi2',Psi3',Psi4',Psi5') You need ...

7 years ago | 1

| accepted

Answered
Not enough input arguments. Error in ratio_magnitude (line 6) RV1 =1/sqrt(1+((f*s)/p)^2);
It seems you are not providing inputs to the function and starught away running to code.......you cannot use a function like tha...

7 years ago | 1

| accepted

Answered
function that checks multiple numbers
function [output] = my_func(input) output = zeros(size(input)) ; c = mod(sqrt(input,1)) ; idx = c==0 ; output(idx) = sqrt(...

7 years ago | 0

Answered
How to Plot y=sin(2*pi*m*x)+sin(2*pi*n*x) , where m and n are positive integers and x is a variable
m = 0:1:10 ; n = 0:1:10 ; [M,N] = meshgrid(m,n) ; x = pi/4 ; Y=sin(2*pi*M*x)+sin(2*pi*N*x); surf(M,N,Y) If you wan...

7 years ago | 0

| accepted

Answered
how to divide a column vector by a scalar?
A = rand(54,1) ; scalar = rand ; iwant = A/scalar ;

7 years ago | 1

| accepted

Answered
Automatically crop the border of an image
Check this link: https://in.mathworks.com/matlabcentral/answers/297568-how-to-remove-white-background-from-image

7 years ago | 1

| accepted

Answered
Vertcat Issue in Table Concatenation
It seems you are not concatenating a column table...so the error. col1 = rand(10,1) ; col2 = rand(20,1) ; row1 = rand(1...

7 years ago | 1

Answered
Surf Question/ Data dimensions must agree
YOu have asked this question already here: https://in.mathworks.com/matlabcentral/answers/449546-problem-with-index-dufort-frank...

7 years ago | 0

Answered
Hi I have raw data 3D accelorometer
REad about reshape A = rand(300,3) ; B = permute(reshape(A, 300/30, 3, []), [1, 3, 2]);

7 years ago | 0

Answered
How do you save variables to vectors and plot them?
x = zeros([],1) ; y = zeros([],1) ; for i = 1:10 x(i) = i ; y(i) = rand ; end plot(x,y) ;

7 years ago | 0

Answered
velocity from xyz coordinates
Get the mean of ball i.e from 15001x3 array at each time step...you will get 15001X3 means..i.e a single mean at each time step....

7 years ago | 0

| accepted

Answered
Contour plot for given x,y,z
[num,txt,raw] = xlsread('Book1.xlsx') ; x = num(:,1) ; y = num(:,2) ; z = num(:,3) ; figure(1) scatter(x,y,20,z,'fill...

7 years ago | 3

| accepted

Answered
How to interpolate this variable
Read about interp2., imresize. Le A be your 190*40 variable. B = imresize(A,[190 400]) ; B(B==0) = NaN ; pcolor(B') sh...

7 years ago | 1

Answered
how move locations of each pixels in an image to another location
I = imread('peppers.png') ; figure(1) imshow(I) % indices to move idx0 = 10:100 ; idy0 = 10:100 ; % indices move here i...

7 years ago | 0

| accepted

Answered
For loop execution for saving data in a matrix or file
Mr Darpan VErma: I strongly suggest you to take basic tutorial in MATLAB, it is very easy and saves your time. YOu need not to ...

7 years ago | 0

| accepted

Answered
storing values in matrix using for loop
answerA = zeros(3,1) ; answerB = zeros(3,1) ; answerC = zeros(3,1) ; for i=1:3 answerA(i)=1*i ; answerB(i)=2*i ;...

7 years ago | 1

| accepted

Load more