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

9 months ago | 0

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

9 months ago | 0

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

9 months ago | 0

Answered
Multivariate B-spline interpolation
Read about interpn

9 months ago | 0

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

9 months ago | 1

| accepted

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

10 months ago | 0

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

10 months ago | 0

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

10 months ago | 0

| accepted

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

10 months ago | 1

| accepted

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

10 months ago | 0

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

10 months ago | 0

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

10 months ago | 0

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

10 months ago | 1

| accepted

Answered
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)

10 months ago | 0

| accepted

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

10 months ago | 0

Answered
Plotting in 3D
Read about surf

10 months ago | 1

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

10 months ago | 0

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

10 months ago | 0

Answered
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

10 months ago | 0

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
Repalce YY(t+1) = y; UU(t+1) = u; with YY(t+1,:) = y; UU(t+1,:) = u;

10 months ago | 0

Answered
Arrays have incompatible sizes for this operation.
sys.B is of size 2x4 and u is of size 3x1....how you can multiply them?

10 months ago | 0

| accepted

Answered
gradient arrows plot in matlab
a=0.819*10^(-3); b=2.73*10^(-3); Vo=15; rho=linspace(a,b,100); %Updated t t=linspace(0,2*pi,360); [rr,tt]=meshgrid(rho,t);...

10 months ago | 0

| accepted

Answered
How to extract odd numbered elements.
A = 1:10 ; % Pick only odd elements idx = mod(A,2)~=0 ; A(idx)

10 months ago | 0

Answered
How to find every principal submatrix of a matrix. (given input row and column indices)
You can delete 1, 3 rd row and column from 5x5 matrix using: A = rand(5) ; A([1 3],:) = [] ; % delete 1st and 3rd row A(:...

10 months ago | 0

Answered
I want to draw a mesh surface. But when I use that code to draw it, YZ line is disappeared...
x=[1 2 3]; y=[1 2 3 4]; [X,Y]=meshgrid(x,y); Z=Y; surf(X,Y,Z)

10 months ago | 0

| accepted

Answered
Index in position 1 exceeds array bounds (must not exceed 1).
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1388229/radd.csv') ; dB = T.(3) ; % pol_1 = 10*lo...

10 months ago | 0

Answered
Problem with variable 'nanmean'.
Use mean mean(data,'omitnan')

10 months ago | 0

Answered
Solving equation using 'vpa' function
syms x; eqn = sin(x - 1.1556)+(sin(1.1556)*exp(-x/2.2683))==0; solve(eqn,x) vpasolve(eqn,x)

11 months ago | 0

Answered
How to plot a mashgrid within an ir-regular shape?
clc; clear ; x=72.68:0.005:72.97; y=34:0.005:34.7; n = length(x ) ; m = length(y ) ; [X,Y] = meshgrid(x,y ) ; data=readm...

11 months ago | 0

| accepted

Load more