Answered
Replace some values to NaN using a condition found in a second vector
idx = DOY >= 321 & DOY <= 330 ; H(idx) = NaN ;

4 years ago | 0

Answered
Finding poinnt of interception between two lines on graph
You can use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

4 years ago | 0

| accepted

Answered
Storing variables in for loop
csvFiles = dir('*.csv') ; N = length(csvFiles) ; iwant = cell(N,1) ; for i = 1:N iwant{i} = csvread(csvFiles(i).name)...

4 years ago | 1

Answered
finding common rang between two different range?
This will work for you: https://in.mathworks.com/matlabcentral/answers/478661-finding-the-common-range-between-two-ranges SEe...

4 years ago | 2

Answered
How to move data finite element analysis from solidwork to matlab and make figure like in solidwork ?
Try this file exchange: https://in.mathworks.com/matlabcentral/fileexchange/32719-postprocessing-in-fem

4 years ago | 0

Answered
extrapolate values from matrices and graphs
I don't think it is extrapolation, it is interpolation. Read about interp2. iwant = interp2(XX,YY,ZZ,lonP_T,latP_t)

4 years ago | 0

Answered
Why am I getting: Error using sum - Invalid option. Option must be 'double', 'native', 'default', 'omitnan', or 'includenan'.
Repalce this line: distances_1{dd} = sqrt(sum(cell_of_doubles{dd}(:,1:3),1,1).^2); with distances_1{dd} = sqrt(sum(cell_of_do...

4 years ago | 0

| accepted

Answered
How to reverse gradient of colormap in Matlab?
x_fract=[0 0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 9.5 10.5 11.5 12.5 13.5 14.5 15.5 16.5 17.5 18.5 19.5...

4 years ago | 0

| accepted

Answered
Error using reshape To RESHAPE the number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
The error is simple.....the number of elements should no change when you are reshaping. EXample: A = rand(1,10) ; reshape(A...

4 years ago | 0

Answered
combining and separating two matrices
A = [1 2 4 7 5 3 9 5 1] ; B =[3 8 4 5 4 2 8 3 6] ; D = cell(3,3) ; ...

4 years ago | 0

| accepted

Answered
Code doesn't run.
s = "Matlab rocks"; fprintf ('%s\n',s);

4 years ago | 0

Answered
Loading data into MATLAB and plotting it ?
Why you want to use gui? REad about the functions readtbale, csvread. These functions are startight forward. To plot the data yo...

4 years ago | 0

Answered
How to select time range for many years?
t1=(datetime(2010,1,1):days(1):datetime(2021,12,31))'; t1.Format = 'yyyy-MM-dd'; [y,m,d] = datevec(t1) ; % pick Jan to Ma...

4 years ago | 1

Answered
loop for exctracting daily data for january, february, december,
t1=(datetime(1950,1,1):hours(24):datetime(2020,12,31))'; t1.Format = 'yyyy-MM-dd hh:mm:ss'; [y,m,d,H,M,S] = datevec(t1) ; %...

4 years ago | 0

| accepted

Answered
I have a this message error
It is not an error. It is a warning. You have used some performance metric but that is not compatible/ supported with your prese...

4 years ago | 0

Answered
Plotting multiple graphs on the same plot
x = linspace(0,2*pi) ; z = [1, 2, 9, 77]' ; y = sin(8*x+pi) + 2*x.^2/3 + 3*z ; plot(x,y) ; legend('z=1','z=2','z=9','z=77'...

4 years ago | 1

Answered
How do i plot an audio file with an interval in ms?
idx = t <= 20*10^-3 ; plot(t(idx),x(idx))

4 years ago | 1

Answered
I want to generate a sine wave with decreasing amplitude after a fixed interval
You may proceed something like below: t = linspace(0,15,1000) ; y = zeros(size(t)) ; idx = t<=5 ; y(idx) = 10*sin(t(...

4 years ago | 0

Answered
How to properly take fft in MATLAB plus take real and imaginary components?
You have used abs at the fft, how do you expect aa complex out put? You should not take abs if you want the complex output. t ...

4 years ago | 0

Answered
How to adjust dimension in xx
for i=1:M for j=1:n xx(i,j)= (x(i,j) - b)+ ((x(i,j) + b)-(x(i,j)-b)).*rand; end end

4 years ago | 0

Answered
How to view dashed line with multiple data?
You can plot them with different colors or with different markers. This would be better. Other option is, you can skip some da...

4 years ago | 1

| accepted

Answered
How to find area and how to shade the area between two curve?
REad about trapz. Looks like a similar code and question: https://in.mathworks.com/matlabcentral/answers/1676339-how-to-fill-t...

4 years ago | 0

Answered
error using zeros Size inputs must be integers.
Replace this line: F2=zeros(tinggi_baru, lebar_baru); with: F2=zeros(fix(tinggi_baru), fix(lebar_baru));

4 years ago | 0

| accepted

Answered
How to plot a road along its height.
Read about surf. It also depends on what data you have and how want to show up the plot. More help on sharing the data and showi...

4 years ago | 0

| accepted

Answered
How to fill the area between two curves?
clear all %clear all variables clc % clear output screen Lx = 150; Ly = 150; T0 =0; T1 = pi/4; T=3.175;...

4 years ago | 0

| accepted

Answered
How to change Y-axis coordinates of meshgrid
>> hax = gca; hax.YTickLabel = flipud(hax.YTickLabel);

4 years ago | 1

Answered
How do I smooth a curve on a surf plot?
surf(ZFF_vals, DFF_vals, Fin) shading interp

4 years ago | 0

Answered
How can I Save a matrix generated from for loop into an array
Q=23; F=67 ; Hinge = zeros(4,4,[]) ; count = 0 ; for Y=2:4:38; for W=-188:13:-71; for G=77:18.64:244.76; ...

4 years ago | 0

| accepted

Answered
How do I convert dates to days?
Read about datevec. This will give you respective days from the dates.

4 years ago | 0

Answered
How to covert all table entries to non-cell?
Two options. While reading the table, you can specify the format of each column and read it. Read about the detectImportOptions...

4 years ago | 0

Load more