답변 있음
Calculate running hold duration
% T = readtable('example.xlsx') ; T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/732154/example.x...

4년 초과 전 | 0

| 수락됨

답변 있음
plot and then plot the same graph with filled area
x = linspace(0,2*pi) ; w = @(x) x.*exp(-x).*cos(x) ; y = w(x) ; figure plot(x ,y) figure; area(x,y)

4년 초과 전 | 0

답변 있음
sphere coordinates using latitude and longitude system
r = 1; % Radius 1 km xo = 0; yo = 0; zo = 0; %Center, give points of A m = 20; n = 10; theta=0:2*pi/m:2*pi ; phi=-pi/2...

4년 초과 전 | 0

답변 있음
Average or sum specific-non-sequential columns
Let A be your 100x10 matrix. You can remove the said columns from he matrix and use the functions to get what you want. idx = ...

4년 초과 전 | 0

| 수락됨

답변 있음
How do I print out a sequence of numbers on a text file using fprintf??
fid = fopen('test.txt','w') ; fprintf(fid,'%s %s %s\n','Imaage Number','centx','centy') ; n = 10 ; for i = 1:n fprintf...

4년 초과 전 | 0

답변 있음
Issue in plotting of output after function
function myfun() syms theta A = cos(theta).*[1 5 6; 2 9 3; 5 1 0]; B = tan(2*theta).*[8 5 1; 0 1 6; 2 4 7]; myfun = @(t,y)sc...

4년 초과 전 | 0

| 수락됨

답변 있음
How to plot XRD data as 3D plot?
Read about surf. This is your function.

4년 초과 전 | 1

답변 있음
What's the quickest way to find frequency of a signal?
Read about fft.

4년 초과 전 | 0

답변 있음
Selection data with percentage
X = rand(1,100) ; % say your data or units n = length(X) ; % move in the order A = X(1:60/100*n) ; B = X(60*n/100+1:end...

4년 초과 전 | 1

| 수락됨

답변 있음
How to set a new default linewidth for stem plots
x = rand(1,5) ; h = stem(x) ; h.LineWidth h.LineWidth = 2 ;

4년 초과 전 | 0

답변 있음
hi please help me to fix this error: Attempt to reference field of non-structure array,
The input which you are using i.e. options should be a structure with fields ProblemSize PopulationSize minPosition maxPos...

4년 초과 전 | 0

답변 있음
Extract consecutive data points between 2 thresholds
Let t be your dates in datetime format and w be your wind data. % get indices of wind lying in [20, 30] idx = w>= 20 & w <= 3...

4년 초과 전 | 0

답변 있음
How to find an area inside of the curve?
Read about area, polyarea.

거의 5년 전 | 1

답변 있음
plot graph, and add value
x = (1:10)' ; y = rand(size(x)) ; plot(x,y,'.r') hold on text(x,y,num2str(y))

거의 5년 전 | 0

| 수락됨

답변 있음
How do I prelallocate this sed as there is no loop here?
When you use the way you have shown,MATLAB created a n-D zeros matrix. You need to use as shown below: uLS1 = zeros(1,N_e...

거의 5년 전 | 0

| 수락됨

답변 있음
Area under distribution fit curve
Let Y be your 261345x1 data. X = (1:length(Y))' ; trapz(X,Y)

거의 5년 전 | 0

답변 있음
I want to find the inverse of my function 'mag' and plot it as 'mag1'
Inverse of mag = sin(3*theta); Would be: theta = asin(mag)/3 ;

거의 5년 전 | 0

| 수락됨

답변 있음
save multiple plots in user specified folder in jpg form
Read about saveas. After the plot you can use: saveas(gcf,'Figure1.jpg')

거의 5년 전 | 0

답변 있음
Why matrix return all 'false/0' when there are a lot of similar values between matrix and a column vector?
You should not compare the floting point numbers like that. You should check the difference between them to be less than some to...

거의 5년 전 | 0

| 수락됨

답변 있음
Simple question for using 'for loop'
a = zeros([],1) ; c = 0 ; for n = 1:2:10 %This is my homework request.I can't change this. c = c+1 ; a(c) = 2^n ; ...

거의 5년 전 | 0

답변 있음
Plotting random numbers in histogram and bin allocation.
You have striaght away functions to achieve what you want. Read about histogram, mean, std.

거의 5년 전 | 0

| 수락됨

답변 있음
Need help to get the minimum absolute value of intersection point
Use this file exchange: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

거의 5년 전 | 0

| 수락됨

답변 있음
How to plot third variable in a 2d plot?
If you have a plane, read about pcolor, surf, patch. If you have a curve read about scatter. If not share your data and tell...

거의 5년 전 | 1

답변 있음
How to compare rows of a matric?
A = rand(1,3) ; % your row B = rand(3) ; % Say complete matrix idx = A > B ; % comapre r = find(sum(idx,2)==3) % find...

거의 5년 전 | 0

| 수락됨

답변 있음
summation of answers received in a "for" loop
t_liner=1.5 ; t1 = zeros(5,1) ; t2 = zeros(5,1) ; t_layer = zeros(5,1) ; t_total = zeros(5,1) ; for i=1:5 if rem(i,...

거의 5년 전 | 0

| 수락됨

답변 있음
Is there a way to exclude variables from a string array after they've been chosen using menu function?
Read about setdiff. Or use strcmp get the position and remove the string.

거의 5년 전 | 0

| 수락됨

답변 있음
Need To Find Value of Y at X for Curve Z. Detail Problem Explained in description
Read about knnsearch, you provide (Y,Z) data and for a given (y,z) find which point is closest, get the index and assign the res...

거의 5년 전 | 0

답변 있음
Problem with Interpolation function involving 2 variables
T = readtable('xyz.xlsx') ; x = T.X ; y = T.Y ; z = T.Z; Xq = -60:60 ; Yq = -160:160. ; [Xq,Yq] = meshgrid(Xq,Yq...

거의 5년 전 | 0

답변 있음
why do I receive "Index in position 1 is invalid. Array indices must be positive integers or logical values"
In MATLAB the indexing should be always positive integers and/ or logical. A = rand(1,10) ; A(1) % no error A(10) % no er...

거의 5년 전 | 0

답변 있음
query horizonal range of 3-D views
Read about slice.

거의 5년 전 | 0

더 보기