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

3 months ago | 0

How to generate scatter plot similar to attached scatter plot?

3 months ago | 0

| accepted

Issues with splitting a matrix into many smaller matrix

4 months ago | 0

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 =...

4 months ago | 0

| accepted

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

4 months ago | 0

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 = [...

4 months ago | 0

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...

4 months ago | 0

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...

4 months ago | 0

| accepted

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(...

4 months ago | 0

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...

4 months ago | 0

| accepted

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

4 months ago | 1

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,...

5 months ago | 0

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) ; ...

5 months ago | 0

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 ...

5 months ago | 0

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...

5 months ago | 0

| accepted

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...

5 months ago | 0

| accepted

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

5 months ago | 1

| accepted

spatial and temporal mean of ERA5 monthly data

5 months ago | 0

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...

5 months ago | 0

| accepted

using quiver to create a vector field for an equation with only 1 variable.
alpha = rand ; beta = rand ; p = rand ; q = rand ; y = linspace(0,1) ; yprime = alpha*y - beta*y.^2-(((y.^3)*p)./((y.^3)+q)...

5 months ago | 0

Sum values on the maximum number of consecutive days
load Sample.mat ; R_3 = R_3' ; n = 1:length(R_3) ; ii = zeros(size(R_3)); jj = R_3 > 1 ; ii(strfind([0,jj(:)'],[0 1])) =...

5 months ago | 0

How to determine phase shift?

5 months ago | 0

Multivariate B-spline interpolation

5 months ago | 0

How to plot single colorful line?
x=[1 2 3 4 5 6 ]; y=[1 2 3 4 5 6 ]; z = zeros(size(x)); col = x; % This is the color, vary with x in this case. surface([x;...

5 months ago | 1

| accepted

Iteration through column multiple times
figure hold on for i = 1:16 cplot = squeeze(C(i,:,:)) ; pcolor(xMap+i,yMap,cplot) ; %<--- you need to think of xMap...

6 months ago | 0

How to set validation for LSTM Model
options= trainingOptions('adam',... ExecutionEnvironment = 'auto',... MaxEpochs = Epoch,... MiniBatchSize = mini...

6 months ago | 0

A line is not appearing when I graph
D=0.05; %m V_Ice=10; %m^3 T_mi=24;%C Ts=0;%C f_vi=0.8;% N=10; %Tubes L=1.55 ;%m m_dot=linspace(0.005,0.05); %kg/s % <--...

6 months ago | 0

| accepted

Plot data and keep the maximum values

6 months ago | 1

| accepted