답변 있음
i can't plot this function in matlab
You see, your f is not a complex number. As you are plotting it as complex, you are getting a striaght line. t=-1:0.01:1; a...

4년 초과 전 | 0

답변 있음
looping through columns of a matrix and saving output
This kind of error occurs when you are trying to save more number of elements than it is intiliazed. Example: A = zeros(1,3) ...

4년 초과 전 | 0

답변 있음
Compare two vectors in matlab n*m
A=[1 2 3 4 5 6 7 8 9 10] ; B=4 ; idx = A >= B

4년 초과 전 | 0

답변 있음
making functionality by experiment results
Read about regression. https://in.mathworks.com/help/stats/mvregress.html

4년 초과 전 | 0

답변 있음
find the x value
I will show one for you, rest you should follow the same. % y=10 sqrt(x) + 20 x >= 8 x = linspace(8,100) ; y =...

4년 초과 전 | 1

답변 있음
Approximate dots area by circle and define its radius
Find the mean of the points, C. This will be center of circle. Find the distance between C and each point. Get the maximum of...

4년 초과 전 | 1

| 수락됨

답변 있음
How to check for file existence in previous folder
exist('../filename')

4년 초과 전 | 0

| 수락됨

답변 있음
how to read a value in matlab from an xls file
T = readtable('whatever.xls')

4년 초과 전 | 0

| 수락됨

답변 있음
How to find the 2-D correlation coefficient between the two images, each having same pixels?
Read about ssim. You can try: R = regression(Img1(:),Img2(:)) ;

4년 초과 전 | 0

답변 있음
how to empty the cell of any array whose index is in another matrix
A(B) = {[]}

4년 초과 전 | 1

답변 있음
Finite Element Analysis in Matlab
It is not an error, it is a warning. You need to initialize the variables which you are using in loop. Replace the lines: for...

4년 초과 전 | 1

답변 있음
help with regression fitting - curvilinear
load('data.mat') p = polyfit(data(:,2), data(:,1), 2); xi = linspace(min(data(:,1)),max(data(:,2)),1000) ; yi = polyval(p, ...

4년 초과 전 | 0

| 수락됨

답변 있음
Can't work out what I did wrong
Replace the line rror_f=(f(x)-g(x)/g(x)) ; with rror_f=(f-g./g) ; f and g are already evaluated with the given values of x....

4년 초과 전 | 0

답변 있음
How to create grid coordinates using elements of two matrices
A = [2 3 ; 4 5] ; B = [6 7 ; 8 9] ; for i = 1:2 for j = 1:2 P = [A(i,j) B(i,j)] end end

4년 초과 전 | 0

| 수락됨

답변 있음
Hello I would like to find two values of x similar/close to 0.71 for the same value of y as shown in the image file.
x = (1:length(y))' ; idx = knnsearch(y,0.7,'k',2) ; plot(x,y,'r') hold on plot(x(idx),y(idx),'*k')

4년 초과 전 | 1

| 수락됨

답변 있음
Eigenvalue and Eigenvector extracting
t = 0:0.5:10 ; A = @(t) [t^2/2 (1+t)/2 t^2 ; 3 0 t^3-1 ; 4 0 0] ; nt = length(t) ; V = zeros(3,3,nt) ; D = zeros(3,...

4년 초과 전 | 0

| 수락됨

답변 있음
how to find peaks for 100%,75%,50%,25% of the max peak
T = readtable('VINCENT NORMALISED MC.txt') ; x= T.(1) ; y = T.(2) ; % find max [val,idx] = max(y) ; % find 75, 50 and 25...

4년 초과 전 | 1

답변 있음
How can I plot 5 different variable all together?
You can use plot, you will get 5 different curves and you can put legend for each. Or you can plot them as surface using surf....

4년 초과 전 | 0

| 수락됨

답변 있음
I am finding error while writting code of tridiagonal matrix as my matlab do not konw what is tridiagonal
Do not run th function as code i.e. you are running the code with f5 or using the run button. You need to give inputs to the fun...

4년 초과 전 | 0

답변 있음
Creating 2D Matrix from latitude/longitude values
Let (x,y,r) be your lon,lat, radar reflectivity values in column. xi = -92.5:0.02:-87.5 ; yi = 27.2:0.02:32 ; [X,Y] = mesh...

4년 초과 전 | 0

답변 있음
Turning for outputs into a row vector
a = -2:2 ; for i = 1:length(a) b(i)=a(i).^2 end No Loop needed: a = -2:2 ; b = a.^2 ;

4년 초과 전 | 1

| 수락됨

답변 있음
To make a function of n variables using a vector of length n
V = [10 20 30 40] ; x = rand(1,4) ; f = x*V' ;

4년 초과 전 | 0

답변 있음
Plotting of the function 𝑥(𝑡) = 𝑒^(𝜆*𝑡) for λ = −1, −2, −3, −4 and 0 ≤ t < 10
DEfine lambda values. DEfine t values. Write the formula. Substitue lambda, t in the equation. Use plot. Example: t = l...

4년 초과 전 | 0

답변 있음
How to obtain and locate group of pixel value from .mat file
Read about logical indexing. Let C be your data. idx = C >= 0 & C < 2 ; c02 = C(idx) ; idx = C >= 2 & C < 4 ; c24 = C(id...

4년 초과 전 | 0

| 수락됨

답변 있음
How to Plot the parametric space curve of matlab
x = linspace(-5,5) ; y = linspace(-5,5) ; [X,Y] = meshgrid(x,y) ; Z=-7./(X.^2+Y.^2+1) ; surf(X,Y,Z)

4년 초과 전 | 1

| 수락됨

답변 있음
Problem in using interp2
Vq = interp2(X,Y,V,Xq,Yq) ; In the above V is the value at (X,Y). You need to have that value.It seems you have only Lon and L...

4년 초과 전 | 0

답변 있음
using datetime() in retrieving data
Read about datevec. This will split your date into year, month, day, hour, minute and secobd. From here you can use logial index...

4년 초과 전 | 0

답변 있음
Extract a profile from 3D data
If data is structured: x = X(1,:) ; y = Y(1,:) ; % give your required row value depending on y-value z = interp2(X,Y,Z,x,y)...

4년 초과 전 | 0

| 수락됨

답변 있음
Writing a math equation.
x = linspace(0,pi) ; f = sin(1+x) ; plot(x,f)

4년 초과 전 | 0

더 보기