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

9 mesi fa | 0

| accettato

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

9 mesi fa | 1

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

9 mesi fa | 0

Risposto
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 mesi fa | 0

Risposto
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 mesi fa | 0

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

10 mesi fa | 0

| accettato

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

10 mesi fa | 0

| accettato

Risposto
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

10 mesi fa | 1

| accettato

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

10 mesi fa | 0

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

10 mesi fa | 0

| accettato

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

10 mesi fa | 0

Risposto
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])) =...

10 mesi fa | 0

Risposto
How to determine phase shift?
Refer this: https://in.mathworks.com/matlabcentral/answers/91647-how-do-i-calculate-the-amplitude-ratio-and-phase-lag-for-two-si...

10 mesi fa | 0

Risposto
Multivariate B-spline interpolation
Read about interpn

10 mesi fa | 0

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

10 mesi fa | 1

| accettato

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

11 mesi fa | 0

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

11 mesi fa | 0

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

11 mesi fa | 0

| accettato

Risposto
Plot data and keep the maximum values
Read about envelope T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1402969/data.txt') ; x = T.(1...

11 mesi fa | 1

| accettato

Risposto
A unknown bug on matrix
This is not bug....don't use the sqaure braces. If you are using square braces, than space is considered as a different eleme...

11 mesi fa | 0

Risposto
I want to read 2 nc files which containing soil moisture as variable, but when readin the given code ,it showing some error
file1= 'path of the file1' ; % path with ame of file file2='path of file2' ; % path with name of file sm1= ncread(file1,'sm'...

11 mesi fa | 0

Risposto
How to do a Taylor expansion with a matrix
syms x f = exp(x) T = taylor(f) In place of x substitue each value of G.

11 mesi fa | 0

Risposto
How to calculate and plot this pcolor plot?
A = rand(1100,800,764) ; mu = mean(A,3) ; sigma = std(A,[],3) ; idx = mu >= sigma/sqrt(764) ; h = pcolor(idx) ; h.EdgeColo...

11 mesi fa | 1

| accettato

Risposto
Can this equation be solved for x? How does the solution look? Thank you
syms x a b c d eqn = x^2-b*x+a^2*x^4-d*x^2+c==0 s = solve(eqn,x)

11 mesi fa | 0

| accettato

Risposto
Interpolation of a matrix in 2D for complex numbers
You may use imresize. Let A be your complex matrix: B = imresize(A,2) ; % this makes double the size of A, you can specify t...

11 mesi fa | 0

Risposto
Plotting in 3D
Read about surf

11 mesi fa | 1

Risposto
Plotting data in 3D
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1392204/plotdata.xlsx') ; plot3(T.(3),T.(4),T.(5),...

11 mesi fa | 0

Risposto
I can't find what's wrong with my code
As you are doing a single point at time, you need to use the marker '.'. %input data D_AB=1.5e-07; D=0.1; t=5058.85; n=5...

11 mesi fa | 0

Risposto
Trying to do an if/and statement on a vector but have an addition apply to only one element of vector
direction = [350; 8; 355; 1; 359]; direction0 = direction ; direction(direction<10)=direction(direction<10)+360

11 mesi fa | 0

| accettato

Carica altro