답변 있음
knnsearch but with a constraint
You can specify the number of points you want from knnsearch. Get as many number of points you want. After calculate the angle a...

4년 초과 전 | 1

답변 있음
Reshaping the first row of a matrix as the first elements a column
A = rand(11,3); A = A' ; A(:)'

4년 초과 전 | 0

답변 있음
GEO-MAPPING OF UNITS BY EU-NUTS SHAPE FILE
Load the shape files using function shaperead. Read about this function. You can get nearest locations using knnsearch. Read a...

4년 초과 전 | 0

답변 있음
Restrict x values while plotting the pdf function
mu2=3; sigma2=2; X2=normrnd(mu2,sigma2,[200,1]); sorted_X2=sort(X2); Y2=normpdf(sorted_X2,mu2,sigma2); figure hold on plo...

4년 초과 전 | 0

| 수락됨

답변 있음
filter data in matrix
Let A be your matrix of size m*2. idx = A(:,1)<100 ; % get logical indices in first column less than 100 A(idx,:) = [] ; %...

4년 초과 전 | 0

| 수락됨

답변 있음
How do I make numbers shift using a while loop while keeping the last itteration?
A = 1:5 ; % example array for n = 1:5 % loop for shifting B = circshift(A,n) ; % for comapring the answer use inbui...

4년 초과 전 | 0

답변 있음
How to change the resolution of a data?
Read about meshgrid and interp2. With meshgrid you define your required resolution grid. And using interp2 you can get the dat...

4년 초과 전 | 1

| 수락됨

답변 있음
Import excel sheet column to drop down component fields
You can load the excel file using readtable. This will give you a table with column names as the naems given in excel file. T ...

4년 초과 전 | 0

| 수락됨

답변 있음
how to filter particular set of dates from a column?
Convert the dates to datenum and use logical indexing i.e. use inequalitties.

4년 초과 전 | 0

| 수락됨

답변 있음
Pulling 100 out of 1000 values from a column matrix
iwant = A(1:100)

4년 초과 전 | 0

| 수락됨

답변 있음
I need to write a for loop that will find the largest value.
k = 10 ; limit = 100; thesum = 0 ; for i = 1:k thesum = thesum+i^i/10 ; if thesum >= limit break e...

4년 초과 전 | 0

답변 있음
How to get the x, y data after using smoothing spline in Matlab?
%Load the x-axis data filename1 = 'Time.xlsx'; Time = xlsread(filename1); %Load the y-axis data filename2 = 'X.xlsx'; X= xl...

4년 초과 전 | 0

답변 있음
how can i change the error in line 80 column 18?
This line: y = fast fourier transform (x,n); Why there are spaces? Is it a function or you mean y = fft(x,n); Note that ther...

4년 초과 전 | 1

| 수락됨

답변 있음
Compare two arrays of different lengths and return logical
Read about ismember.

4년 초과 전 | 1

답변 있음
for loops and odd numbers
n = 8 ; x = 1:n ; idx = mod(x,2) odd_nus = x(logical(idx))

4년 초과 전 | 1

| 수락됨

답변 있음
Determination of x,y values (in km) in an area with known Latitudes and Longitudes
Read about polyarea.

4년 초과 전 | 0

답변 있음
how to find features from '.txt' files?
txtFiles = dir('*.txt') ; N = length(txtFiles) ; meanGL= zeros(N,1); varianceGL = zeros(N,1) ; sd = zeros(N,1) ; skew = z...

4년 초과 전 | 0

| 수락됨

답변 있음
How to mark range of Y values in a plot?
AStudent=randi(50,1,100); BStudent=randi(50,1,100); CStudent=randi(50,1,100); DStudent=randi(50,1,100); figure hold on p...

4년 초과 전 | 0

| 수락됨

답변 있음
Integration of exponential function
syms t y(x) f = y(x)*exp(-2*(t-x)) ; int(f,x,0,t)

4년 초과 전 | 0

답변 있음
How do I find max values in a vector
v=[1, 3, 5, 2, -4, -3, -1, 2, 3, 1, 2, -3, -2, -4] ; iwant = [max(v(v>0)) min(v(v>0)) max(v(v<0)) min(v(v<0))]

4년 초과 전 | 0

답변 있음
plotting multiple vertical lines on a graph
figure(1) cla; scatter(x(:,a),y(:,a)) xlabel('X Coordinates') ylabel('Y Coordinates') title('Particle locations in the rice...

4년 초과 전 | 0

| 수락됨

답변 있음
I want to change xlim,ylim of axes , and draw a circle at the point I chose when I click on a place in the axes in GUI
th = linspace(0,2*pi) ; R = 1. ; % Radius of circle x = R*cos(th) ; y = R*sin(th) ; figure axis([-5 5 -5 5]) ; % cahange...

4년 초과 전 | 0

| 수락됨

답변 있음
Output of [~,IDX] = max(...) not in DOUBLE but in INT.
You can convert double into integer using int32 ot int64.

4년 초과 전 | 0

답변 있음
How to plot a curve between 2 data sets
P1=[2.3;3.9;3.5;4.8;5.5;6.3;7.4]; P2=[4.8;5.7;6.5;7.8;9.2;10.5;11.8]; D=[78;65;57;52;46;32;27]; %% Dp=P2-P1; Q=0.24*D; % ...

4년 초과 전 | 0

답변 있음
How to insert variables (string) in MATLAB function
syms t R=[1 0 0;0 cos(t) -sin(t); 0 sin(t) cos(t)]

4년 초과 전 | 0

답변 있음
Monthly Time Series Plot
You can do intepolation by creating your required time stamps or use the inbuilt function retime. https://in.mathworks.com/help...

4년 초과 전 | 0

답변 있음
How to change output format 20 culumn!
r = 2; % number of rows c = 30 ; % number of columns M=rand(r,c)

4년 초과 전 | 0

답변 있음
How do I plot quivers on a curve?
If you are expecting colors based on the magnitude use this: https://in.mathworks.com/matlabcentral/fileexchange/3225-quiverc

4년 초과 전 | 0

답변 있음
generate column array with day in year number for each hour in a year
r=repmat(0:364,24,1) ; r=r(:);

4년 초과 전 | 2

| 수락됨

답변 있음
How to find how many intersections in a graph?
Refer this function: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

4년 초과 전 | 0

| 수락됨

더 보기