답변 있음
how to repeat an input question
A = 'start' ; while ~strcmpi(A,'end') N=input('what is N?: ') %establishes N A=input('give me a sentence!: ','s'); %a...

4년 초과 전 | 0

답변 있음
Find a y axis increasing point in a plot -
Let y be your array. idx = find(y==1) ; iwant = idx(1)-1

4년 초과 전 | 0

답변 있음
Convert an integer into a decimal number
m=2 m/10 If your class of variable is int32 or int64 i.e. an integer. Then convert it to float using double. m = int64(2) ...

4년 초과 전 | 0

| 수락됨

답변 있음
Can you create a matrix where every element is a vector?
You can consider each element as a cell. And then create a cell array. But why? A = cell(2) ; A{1,1}=rand(1,3) ; A{1,2}=rand(...

4년 초과 전 | 0

| 수락됨

답변 있음
Problem using fft();
Remove the mean from the data and then use fft. Say A is your data, (array). For fft use: A = A-mean(A) ;

4년 초과 전 | 0

| 수락됨

답변 있음
How to plot NaN value
idx = isnan(A) ; A(idx) = 0 ; surf(A) view(2)

4년 초과 전 | 0

| 수락됨

답변 있음
How to find all intersections in a Matlab graph?
USe this file exchange: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?requestedDomain=

4년 초과 전 | 0

답변 있음
Storage results in an array
x=[2,3,4,5,6]; y=zeros(size(x)) ; for i = 1:length(x) if x(i)>4 y(i)=x(i)^2 else y(i)=x(i)+2 ...

4년 초과 전 | 0

| 수락됨

답변 있음
What does 'li' mean?
1i stands for complex number. i.e. sqrt(-1). c=2+3*i c=2+3*1i

4년 초과 전 | 0

답변 있음
how can I extract 2D matrices for xy, xz, yz planes from a 3D matrix and use the pcolor function?
Read about slice. This is your function.

4년 초과 전 | 0

| 수락됨

답변 있음
How to read the desired coordinates from this image and find the coordinates with the highest value
You have plotted this image with the coordinates in hand. USe max function to get the maximum value. Read about function max. ...

4년 초과 전 | 0

| 수락됨

답변 있음
How do I plot and return the values of multiple intersections between a function and zero?
You can consider using this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

4년 초과 전 | 0

답변 있음
find minimum from cell array
T = readtable('my_excel.xlsx') ; [val,idx] = min(T.(2)) ; % get minimum from col2 iwant = T.(1)(idx) ; % get the value I...

4년 초과 전 | 0

| 수락됨

답변 있음
I have matrix A and I need to find (e^(At)) where t is the sampling time. How to find that? Also what is the difference between exp(A) and expm(A)?
A = rand(2) ; t = linspace(0,1) ; iwant = zeros(2,2,100) ; for i = 1:100 iwant(:,:,i) = exp(A*(t(i))) ; end exp might ...

4년 초과 전 | 0

답변 있음
how to visualize a data with lon, lat and time array
file = 'EDGAR_HTAP_emi_NOx_2010.0.1x0.1.nc' ; x = ncread(file,'lon'); y = ncread(file,'lat'); Z = ncread(file,'emis_tot') ;...

4년 초과 전 | 1

답변 있음
How do i find max value between 1 and 13 column of 1001 columns.
x = rand(1,1001) ; y = reshape(x,[],13) ; % reshape iwant = max(y,[],2) ; % get max

4년 초과 전 | 0

답변 있음
Running time Average of column values
If A is your column array. iwant = cumsum(A)./(1:numel(A))

4년 초과 전 | 1

| 수락됨

답변 있음
Interpolation of 3 dimensional values from a excel file
Read about interp2. T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/771628/excel%20table.xlsx') ; ...

4년 초과 전 | 0

| 수락됨

답변 있음
How can I run the calculation of one equation through a range of variables in one loop
You can proceed something like below. No need to use loops. i = 1; S_T = 0:3:60 ; TS_T =(deg2rad(S_T));%incline in Radia...

4년 초과 전 | 0

답변 있음
Alternative way of defining a variable
a = zeros([],1) ; b =[] ; But it depends. What is the requirement?

4년 초과 전 | 0

답변 있음
How to strrep only certain strings
x = {'e-.00085';'8.5e-4'}; y = strrep(x,'e','')

4년 초과 전 | 0

답변 있음
Sorting cell array based on distance
Read about knnsearch. This will give you the nearest points from a set points for a given point. This will work for you.

4년 초과 전 | 0

| 수락됨

답변 있음
How to get a square matrix out of a augmented matrix?
n = 5 ; A = rand(n) ; % square matrix B = eye(size(A)) ; % Identity matrix Ag = [A B] ; % augemented matrix

4년 초과 전 | 0

답변 있음
How to find yield point and plot strain hardening part?
file = 'https://in.mathworks.com/matlabcentral/answers/uploaded_files/770221/highstrain.csv' ; T = readtable(file) ; x = T.X ...

4년 초과 전 | 1

| 수락됨

답변 있음
How can I get the sea ice concentration data corresponding to the latitude and longitude from the geotiff file?
filename = 'N_20180101_concentration_v3.0.tif' ; [A,R] = readgeoraster(filename) ; % If not try geotiffread [m,n] = size(...

4년 초과 전 | 0

| 수락됨

답변 있음
Movie function with subplots: error "Unrecognized method, property..."
Try replacing the line: [h, w, p] = size(f(1).cdata); % use 1st frame to get dimensions with [h, w, p] = size(M(1).cdata);

4년 초과 전 | 0

| 수락됨

답변 있음
Plot of a Time Variable
As you have data every second, you need to do hourly mean to get 24 values. You have two options. Reshape the data into 24*m; ...

4년 초과 전 | 0

답변 있음
How can I specify maximum and minimum of a parameter inside a loop
minC = 0; maxC = 0; for i=1:50 A(i)=f(i); B(i)=f(A); C(i)=F(B); if C > maxC maxC = C ; ...

4년 초과 전 | 0

| 수락됨

답변 있음
plot a table of two columns
If T is your table. To plot use: plot(T.(1),T.(2))

4년 초과 전 | 2

| 수락됨

답변 있음
Write function that returns true if (inputmatrix > 0)
A = rand(5) ; P = A > 0.5

4년 초과 전 | 0

더 보기