Answered
Subscript indices must either be real positive integers or logicals.
clc close all clear all n=5; axis([0 100 0 100]) [p]=ginput(n) c=[]; f=[]; T=0:0.0001:1 ; for i = 1:length(T) % change...

6 years ago | 0

Answered
How to reshape and rearrange a matrix in a specific way
If A is matrix. USe iwant = A(:) Example: A = [0, 0; -0.001, 0; 0, 0.02] ; A = A' ; iwant = A(:)

6 years ago | 0

| accepted

Answered
how to empty cell from excel and [] those bracket also
If C is your cell array..to remove empty cells: C = C(~cellfun('isempty',C)) ;

6 years ago | 0

Answered
Index exceed number of elements when using data from an excel table
for i=1:length(t) fprintf(' %12s ',t{i}) end for i=1:length(p) fprintf(' %15s \n ',p{i}) end

6 years ago | 1

| accepted

Answered
How to solve a nonliner equation ?
If you want o find the intersection, you can use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersect...

6 years ago | 0

Answered
How to concatenate matrices to calculate mean
Let A be your matrix.....use iwant = mean(A,3) ;

6 years ago | 0

Answered
Find minimum points matlab
subs(d1,res) You will get it as zero.....so the value x = 2 is a root to d1. Also your d1 = 2*x-4. On solving manually 2*...

6 years ago | 0

Answered
how to count the number of terms in syms
You can get the number of sym variables present in the work spce using: s = whos ; iwant = nnz(strcmp({s(:).class},'sym'))

6 years ago | 0

Answered
basic error, help me
x = linspace(20,100000); y = 20*log10(1./(1+(2*3.14*x*985.1*(59*10.^-9)-(985.1./(2*3.14*x*(4.7*10.^-3))).^2).^0.5)); plot(x,y...

6 years ago | 0

Answered
How to write a script function matlab called myflip?
x = rand(1,10 ) ; xr = x ; n = length(x) ; for i = 1:n i xr(i) = x(n-i+1) ; end xr

6 years ago | 0

Answered
How to extract data from 3D matrix using shape file
Your lon, lat are already matrices...you need not to use meshgrid. You are creating unnecessary data. lon = squeeze(filelon) ;...

6 years ago | 0

Answered
colorplot of 3 columns
x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; %%structured xi = unique(x) ; yi = unique(y) ; [X,Y] = meshgrid(xi,yi) ; Z = reshape...

6 years ago | 0

Answered
Triangular plot, Plotting, MATLAB, Ternary plot, color plot, Contour map
Let A be your m*3 column array. Try this: x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; %%structured xi = unique(x) ; yi = unique...

6 years ago | 0

Answered
Error: Unable to perform assignment because the left and right sides have a different number of elements.
for a = 1: (N-1) vf(a+1) = ((-g)+((p-A*a)*(vol*g)/m)-((b*vf(a))/m))*dt+vf(a); end

6 years ago | 0

Answered
calculating simple 2 equations with matlab. give me matlab code please~~
That is pretty simple.....I will give some demo example..you have to extend it to your case. Say got give f I want to find y =...

6 years ago | 0

| accepted

Answered
matrix dimensions are not equal
Read about strcat. If str is your string of size 1*2...to append zero at tne end use: iwant1 = strcat(str,'0') % option 1 i...

6 years ago | 0

Answered
How to compare two variables data by using ifelse? if both variable contain same number and length of data, so condition becomes true it should perform desired functionality.
Read about isequal. a = -6:6; b = -3:3; c = 0:6; d = 0:12; % data = [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6] % user selected dat...

6 years ago | 1

| accepted

Answered
Simple question loop for
Lear debugging code. It will be help ful for you and easy. https://in.mathworks.com/help/matlab/matlab_prog/debugging-proces...

6 years ago | 0

Answered
Removing rows in a matrix
Let A be your data. It seems every four rows have real value of complex number very less. We can use keep these rows. idx = re...

6 years ago | 0

Answered
How can I create a matrix (4x10 for example) like this and insert it into a loop?
row = -5:+5 ; iwant = zeros(4,length(row)) ; iwant(1,:) = row ; for i = 2:4 iwant(i,i:end-i+1) = row(i:end-i+1) ; end i...

6 years ago | 0

Answered
Not enough Input Arguments?
You might be running the function without giving input variables....you should be in the folder where excel file and this functi...

6 years ago | 1

| accepted

Answered
how to put them text lines into loop to reduce the coding line?
x = rand(9,1) ; y = rand(9,1) ; str = strcat(repelem('ola',9,1),num2str((0:8)')) ; text(x,y,str)

6 years ago | 1

Answered
Mathworks account login problems, anonymous user
Your log in would be your email id....you can say forgot password and enter new password by resetting link sent through your ema...

6 years ago | 0

| accepted

Answered
make different numbers with the same digits
str = '215' ; num = str2num(perms(str)) ; greater = num(num>str2num(str)) lesser = num(num<str2num(str))

6 years ago | 0

Answered
code to detection the cars this code not counting cars properly How do i make it count correct ?
It looks like the dimensions of image A, B are not same. So while subtracting you are getting the error. You need to resize th...

6 years ago | 0

| accepted

Answered
how to find a root of polynomial using matlab
sym c(y) c(y)= 1+3*tan(y/sqrt(2))==0 ; r = solve(c,y) ; double(r)

6 years ago | 0

Answered
How to plot the Best Fit circle throught the points?
Try this: https://in.mathworks.com/matlabcentral/fileexchange/5557-circle-fit

6 years ago | 0

| accepted

Answered
Help in Plotting X, Y and Heading Angle
Let V be your 64*15 data matrix. X = V(:,1:5) ; Y = V(:,6:10) ; Z = V(:,11:15) ; % If you want a surface and the data co...

6 years ago | 0

Answered
How to find the gradient of the best fit line?
Gradient is slope...you already have it in your hand.. p = polyfit(x,y,1) ; m = p(1) % slope of line

6 years ago | 0

Answered
How can plot precipitation data with latitude longitude information? I have matrix of precipitation over the time,latitude and longitude all are in 470*160*140 dimensions.
Let lon, lat, P be your matrices of size 470*160*140. [m,n,p] = size(P) ; for i = 1:p pcolor(lon(:,:,i),lat(:,:,i),P(:...

6 years ago | 1

| accepted

Load more