답변 있음
Meaning of a sentence in a code
You can know it by your self. Just take a print of the values. M=3; n=0:30*M-1; m=0:29; x=sin(2*pi*0.04*n); idx = 1:M:leng...

4년 초과 전 | 0

| 수락됨

답변 있음
how to label figure with vertex point in matlab
A = rand(1,2) ; B = rand(1,2) ; C = rand(1,2) ; P = [A;B;C;A] ; label = {'A'; 'B' ; 'C'} ; plot(P(:,1),P(:,2),'.-r') text...

4년 초과 전 | 1

| 수락됨

답변 있음
Identify the individual sides (or boundary) of the binary image.
I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/835530/image.jpeg') ; I1 = rgb2gray(I) ; I2 = im...

4년 초과 전 | 0

답변 있음
How can I select several matrices out of my 4-D Double dataset?
iwant = val(:,:,:,1) ;

4년 초과 전 | 1

답변 있음
Code is displaying graph but not plotting any points
plot([0,100],macheps*[1,1],'-w') It seems you are using white color for plotting. White background doesn't show up the white co...

4년 초과 전 | 0

| 수락됨

답변 있음
detectCircleGridPoints function not found
The said function detectCircleGridPoints is introduced in 2021b. Are you using the same version? Check that. Have a look on t...

4년 초과 전 | 0

답변 있음
Error using fmincon Too many input arguments
You may use scatter3 figure(1); scatter3(x(1),x(2),x(3),[],x(4),'filled');

4년 초과 전 | 0

답변 있음
How to solve this error Index exceeds the number of array elements. Index must not exceed 198450. Error in quant (line 23) plot(t(zoom),Y2(zoom));
The error is simple amd striaght. You are trying to extract more number of elements than present in the array. Example: a = r...

4년 초과 전 | 0

답변 있음
How to do an interpolation on a matrix?
You can convert table to array using table2array. You can access the column of table using x.(1). x=timetable2table(Accelerati...

4년 초과 전 | 0

답변 있음
How to get polynomial equation of polyfit?
fprintf('%f*Year^2+%f*YEar+%f\n',pf)

4년 초과 전 | 1

답변 있음
Sensor Data for look up table
T = readtable('look21 (1).xlsx') x = T.x ; y = T.y ; z = T.z ; xi = linspace(min(x),max(x)) ; yi = linspace(min(y),max(y...

4년 초과 전 | 0

| 수락됨

답변 있음
How can I make a code to display the person's name corresponding to the number from a dice? I have to use a switch statement.
The best option is to use a table as shown below: Number = (1:6)' ; Name = { 'Jane' 'Johannes' 'Jill' 'Joyce' 'Jim' 'Jace'...

4년 초과 전 | 0

답변 있음
Is there a way to simplify two for loops?
L = 1 % L = 1,2,...,7 n = (2^L+1)^2; A = rand(n); D = rand(n); B = D*A*D' ;

4년 초과 전 | 0

| 수락됨

답변 있음
How to compare terms in column and set an if loop
You can find the difference and check when it is equal to zero and get its index. X = [1 2 3 3 4 5 6] ; d = find(diff(X)==0) ...

4년 초과 전 | 0

답변 있음
Error using interp2, line226 and line126
You need to transpose the density matrix: for i=drange(1:100) P=101; result1=zeros(100); result1(i)=interp2(Pr...

4년 초과 전 | 0

답변 있음
Can not get vector field
y = 0:0.1:100; x = -y; [X,Y] = meshgrid(x,y) ; quiver(X,Y)

4년 초과 전 | 0

| 수락됨

답변 있음
converting a date into a num
You can convert dates which are in datetime class using the function datenum.

4년 초과 전 | 0

답변 있음
How to process NC file in matlab
Refer this: https://in.mathworks.com/matlabcentral/answers/574741-create-a-box-around-points-and-use-in-inpolygon

4년 초과 전 | 1

답변 있음
Issue while plotting the equation
z = 3+1i*2 real(z) imag(z)

4년 초과 전 | 0

답변 있음
How to find the area from a Positive and negative signal plot
A = readmatrix('Data.xlsx'); t = (1:length(A))' ; % Positive Area Ap = A ; Ap(A<=0) = 0 ; trapz(t,Ap)

4년 초과 전 | 0

| 수락됨

답변 있음
How to find values from data
You can use logical indexing. Example: A = rand(10,1) ; % data for demo idx = A > 0.3 & A < 0.8 ; idx find(idx) A(idx)

4년 초과 전 | 1

답변 있음
Finding the coordinates of vortices from contour plot
[M,c] = contourf(Z); M has the coordinates you want.

4년 초과 전 | 1

답변 있음
Creating a structure and fields in nested loops
You can use ismember. I don't think you need to use a loop here. T=readtable('fruitvegprices.csv'); % first column of T is ite...

4년 초과 전 | 1

| 수락됨

답변 있음
How to find computational time?
Read about tic toc. t1 = tic ; A=[1 2 3 4 56 7 8 9]; B=[7 8 9 4 55 1 2 3]; for i=1:length(A) Add(i) = A(i)+ 2* B(i);...

4년 초과 전 | 2

| 수락됨

답변 있음
Save array in matrix from for loop
X=xo:((xf-xo)/divnum):xf N = length(X) ; pstarA = cell(N,1) ; pstarB = cell(N,1) ; for i = 1:N x = X(i) ; % ra...

4년 초과 전 | 0

| 수락됨

답변 있음
Event Detection on a circle
clc tspan = [0:0.05:80]; %Range for independent var. i.e. time r = 2; centreX0 = 0; centreY0 = 0; theta = 1.08; Ptheta =...

4년 초과 전 | 0

답변 있음
What is a double matrix?
If it is a string, read about str2num, str2double. If it is a single, use double. If it is a sym class, use double.

4년 초과 전 | 0

답변 있음
Fill Area in matlab plot
Download the function InterX from the link: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections x = ...

4년 초과 전 | 0

| 수락됨

답변 있음
NOT ENOUGH INPUT ARGUMENTS
You might be running the function striaght away using f5 or hitting run button. You need to provide the inputs to the function a...

4년 초과 전 | 0

답변 있음
Convert ezmesh to fmesh
v1 = rand(3,1) ; v2 = rand(3,1) ; h=fmesh(@(x,y)v1(1)*x+v2(1)*y,... % funx @(x,y)v1(2)*x+v2(2)*y,... % funy ...

4년 초과 전 | 1

더 보기