Answered
how to remove a particular season values from monthly time series?
thedates = (datetime(2003,1,1):days(30):datetime(2023,12,31))' ; idx = thedates.Month == 1 | thedates.Month == 2 | thedates.Mo...

6 månader ago | 1

Answered
Segment distance along path (imported from kml) using mapping toolbox
This should be useful for you: https://in.mathworks.com/matlabcentral/fileexchange/34874-interparc

6 månader ago | 1

Answered
Randomly generated cubes in cylindrical volumes in MATLAB
% Draw cyliner Radius = 1. ; % Radius of the cylindrical shell Height = 2. ; % Height of the Cylinder % ...

6 månader ago | 1

| accepted

Answered
My graph isn't picking up my time increments. How can I fix it? My loop generates my x values, but I'm trying to graph them over time.
clear Ts=30; % ms Td=60; % ms Chs=.001; % L/mmhg Chd=.015; % L/mmhg N=800; % number of elements t=0:1:N ; % all time value...

6 månader ago | 0

| accepted

Answered
How to surface or mesh plot imported data?
Refer this link: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns?s_tid=...

6 månader ago | 0

Answered
Error using stem()...... X must be same length as Y.
I have given one wproper working code for unit step signal. Understand it and change the others like wise. t=-5:0.1:5; nt = ...

6 månader ago | 0

Answered
What command has replaced the old MATLAB command called clg?
clf

6 månader ago | 0

| accepted

Answered
How to sorten the result value depicted on text area
REad about fprintf, sprintf

7 månader ago | 0

Answered
Random Gaussian number generators
REad about randn function disorder = generate_disorder(L, W) % Generate a disordered sequence of on-site energies...

7 månader ago | 0

Answered
opening and viewing mat file having different snapshots /class : structure
Read about matfile. S = matfile('myfile.mat') ; You can access the variables of the matfile from S. If you want more specific ...

7 månader ago | 0

Answered
Smallest mask enclosing a polygon
You need not to use a loop. If you want fine mask, increase the resolution. X = longitude; Y = latitude; [Y,X] = meshgrid(Y,X...

7 månader ago | 0

Answered
Error: Illegal use of reserved keyword "end".
Remove end in the code which is lying in the last.

7 månader ago | 0

Answered
How to generate scatter plot similar to attached scatter plot?
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1458992/Test.csv') ; plotregression(T.(1),T.(2)) ...

7 månader ago | 0

| accepted

Answered
Issues with splitting a matrix into many smaller matrix
You need to load the data from csv file into MATLAB first. T = readtable('https://in.mathworks.com/matlabcentral/answers/uploa...

8 månader ago | 0

Answered
Plot Heatmap from distinct coordinates and data array of floats
It depends on your data whether it is structured or unstructured. Let x, y, z be your column data vectors. %%structured xi =...

8 månader ago | 0

| accepted

Answered
flipping a maximum point to become a minimum of the same size
You can chnage the sign right? plot(xup,-yup)

8 månader ago | 0

Answered
Find the velocity of a travelling wave like behaviour
I will suggest to use the function InterX. N = 1000 ; x = linspace(0,200,N) ; y = rand(size(x)) ; L1 = [x;y] ; L2 = [...

8 månader ago | 0

Answered
cropping netcdf files using geo-coordinates
Why don't you use interp2. Let X, Y and Z be your original data. Xi, Yi is your coordinates for which you want to crop/ extrac...

8 månader ago | 0

Answered
Why the given codes give errors for vector bounds but runs well for scalar bounds?
Use this function instead of your bbo3. function [BestX,fmin]=bbo3(obj,dim,lb,ub,iter,pop1) %% Problem Definition CostFunc...

8 månader ago | 0

| accepted

Answered
Not able to figure out the way to deal with large vectors
n=-10:1:10; c1 = 0 ; c2 = 0 ; E = zeros([],1) ; O = zeros([],1) ; for i = 1:length(n) %% Get your x(n) if mod(x(...

8 månader ago | 0

Answered
How to integrate a vector over a surface of x,y-coordinate vectors
You need to find out whether your data is structured is unstructured. Depedning on that, you need to proceed. %%structured x...

8 månader ago | 0

| accepted

Answered
Why are symbolic expressions not exactly symbolic?
It is suggested to use live script. syms x f = taylor(exp(x)) pretty(f)

8 månader ago | 1

Answered
how to put an scale for arrow size in quiver plot for wind vector over map?
[X,Y,Z] = peaks(50) ; [u,v] = gradient(Z) ; w = sqrt(u.^2+v.^2) ; figure hold on h1 = pcolor(X,Y,w) ; h2 = quiver(X,Y,...

8 månader ago | 0

Answered
How to find the range of a contour along each dimension of a plane with least possible error?
C = contour(x,log2(y),Data,[-99,1],'k'); x = C(1,:) ; y = C(2,:) ; iwant = [min(x) min(y) ; max(x) min(y) ; ...

9 månader ago | 0

Answered
Image Processing Dimension Error
This line: point_indices = [1, 2; 2, 3; 3, 4; 4, 1; 5, 6; 6, 7; 7, 8; 8, 5]; should have indices/ values which should be less ...

9 månader ago | 0

Answered
Delete frames from video
vidObj = VideoReader('Motion.avi'); % Read video frames until the end of the file is reached by using the readFrame method. vi...

9 månader ago | 0

| accepted

Answered
fill missing value in array
x = 1:100 ; y = rand(size(x)) ; % Introduce NaN's randomly idx = randperm(100,20) ; y0 = y ; y(idx) = NaN ; % Use in...

9 månader ago | 0

| accepted

Answered
How to save the output of loop function with different names?
for i = 1:10 fname = strcat('plot_',num2str(i),'.png') ; plot(rand(1,10)) saveas(gcf,fname) end

9 månader ago | 1

| accepted

Answered
spatial and temporal mean of ERA5 monthly data
Read about mean. You can specify the dimension you want here.

9 månader ago | 0

Answered
How can I make this code more efficient?
Read abput preallocating/ initializing the variables. nx1=1216; nye=160; dx=1.973684; dy=1.875; nm=0; t1 = tic ; % See th...

9 månader ago | 0

| accepted

Load more