Respondida
Surface Plots of 3D Matrix After sum.
Try B = sum(A); surf(squeeze(B))

más de 6 años hace | 1

| aceptada

Respondida
How to solve Error using griddedInterpolant The grid vectors are not strictly monotonic increasing?
Error using griddedInterpolant The grid vectors are not strictly monotonic increasing. Maybe it's because of lat? It's decreas...

más de 6 años hace | 0

| aceptada

Respondida
Convert x,y,z data to surface matrices(2D array)
Make new mesh in spherical V = p.vertices; for i = 1:3 V(:,i) = V(:,i)-mean(V(:,i)); % move to origin end %...

más de 6 años hace | 0

| aceptada

Respondida
Find knee/elbow of a curve
What about imdilate()? clc,clear I = imread('nett.jpg'); I1 = im2bw(I); I2 = imdilate(I1,ones(20)); Z = 1.0*cat(3,I1,I2...

más de 6 años hace | 0

Respondida
Find cycles in an undirected graph
Just use for loop and cells since you already know indices of each polygon s = [1 1 1 2 3 3 4 4 5 6 6 6 8 9 10 10 12 12 13 14 1...

más de 6 años hace | 2

Respondida
Fill a matrix after an iteration
Maybe TM = (sum(TMR)>6) .* sum(TMR);

más de 6 años hace | 0

| aceptada

Respondida
3D Plotting in MATLAB
Use plot3() % Voltage 9 x9 = [ 19 20 21 21 21 21 20 20 20 20 18 ]; y9 = [ 0 10 30 50 70 90 110 120 140 160...

más de 6 años hace | 0

Respondida
How to create a new array with variables that did not meet the required parameters.
Try cond = DwellTime>=2 & DwellTime<=2.5; [cond.*DwellTime ~cond.*DwellTime]

más de 6 años hace | 0

Respondida
Do not understand Curve intersections code
Intersections just loops through all segments of curves and find all intersections Many of segments have intersections, but i...

más de 6 años hace | 0

Respondida
sfit data array output
This code A = xlsread('ASTMG173.xls'); x = A(:,1); y = A(:,3); plot(x,y) Produces Is it the curve you want to approximat...

más de 6 años hace | 0

Respondida
Can this for-loop code get faster in some way?
Maybe ismember function can be replaced: dt = 60000; period_interval = 0 : dt : ts_length; n = length(period_interval); for...

más de 6 años hace | 1

Respondida
Solving system of nonlinear equation with boundary condition
Use isosurface to visualize roots Use if .. else statement to choose parameter if P > -c^2 T = P; elseif -c^2 < Q && Q ...

más de 6 años hace | 0

Respondida
Coupled differential equations kinetic
yprime and y are always connected function [ yprime ] = calibration( t,y,par,par_cali,T,x1,O2) Your input y were in wrong orde...

más de 6 años hace | 1

| aceptada

Respondida
Solution to ODE in matlab or simulink
I tried to solve this equation first What are constants values? % opengl software G = 2; V = 2.4; Q = 5; J = 1; n0 = 1....

más de 6 años hace | 1

Respondida
Trigonometric approximation on symbolic variables
subs works ok for me syms x y Tp Tw eqn{1} = cos(x) + sin(y) - Tp; eqn{2} = 1 + x + sin(x) - Tw; for i = 1:2 eqn{i}...

más de 6 años hace | 0

Respondida
Curve fitting function not able to reproduce curve accurately
How it's supposed to be 'Accurately' if you change output data %% some input Data id_cont = [-800,-799,-798,-797,-796,-795,-79...

más de 6 años hace | 0

Respondida
Plotting pcolor plot on an image at a particular area.
You can just merge images clc,clear load matlab.mat [m,n] = size(img); [X,Y] = ndgrid(1:m,1:n); Z = (X.*Y).*region; ...

más de 6 años hace | 0

Respondida
plot3 is showing axes but not vectors
First of all use these parenthesis to access an element: vector_e(1) MATLAB is MATrix LABoratory. Take an advantage of it % n...

más de 6 años hace | 0

Respondida
Which line is the first line that has an intersection with another line? or what is the order of the intersectection points?
Use third output argument of polyxpoly [xc,yc,ix] = polyxpoly(x,y,xd,yd) % ix(:,1) - number of intersected segment in [x,y] da...

más de 6 años hace | 0

| aceptada

Respondida
Area fill between minimum and maximum axis limit
Use patch()

más de 6 años hace | 1

Respondida
Plot legend does not display any lines
Please see THIS solution for colorbar error

más de 6 años hace | 2

| aceptada

Respondida
How does this Euler's Method for first ODE work?
Here are some basic concepts 1 - function [x,y] = Euler(h, x0, y0, interval_length, func) % h - step in X direction (dx) % x...

más de 6 años hace | 0

Respondida
How can I solve a system of ODEs having coefficients in vector form using bvp4c ?
Try this function eqns = odes(x,y,e,x0) global Pr phi Ra Da Fr A1 A2 fdesh fdeshdesh thetadesh; % global variables are...

más de 6 años hace | 1

| aceptada

Respondida
Rotating values within a meshgrid
So maybe rotate your data and apply griddata() again a = 45; R = [cosd(a) sind(a); -sind(a) cosd(a)]; V = R*[x(:) y(:)]'; xn...

más de 6 años hace | 0

| aceptada

Respondida
For Loop calculating too slowly
Maybe try [S,M,H] = ndgrid(0:60, 0:60, 0:24); data1 = repmat([2019 9 30],[length(S(:)) 1]); data2 = [H(:) M(:) S(:)]; data =...

más de 6 años hace | 0

Respondida
4d plotting with slices
slice() just doesn't use last column and row for displaying colors So i just copied values [X,Y,Z] = meshgrid(0:4, 0:5, 0:4); ...

más de 6 años hace | 0

| aceptada

Respondida
Why doesn't my blue point move towards my red point?
your initial D_VT (86.02) bigger than D (3.0) while D_VT < D % shoudl be: D_VT > D In your loop you clear previous ...

más de 6 años hace | 0

Respondida
Fill line with colors using the heatmap
What about pcolor() clc,clear n = 50; x = linspace(-5,5,n); [X,Y] = meshgrid(x); for i = 1:n y = sinc(x(i))+0.5; ...

más de 6 años hace | 0

| aceptada

Respondida
solving 4th order ode
Use bvp4c() You already have written your equation as system of first-order equations function dydt = ode4(t,y) L=1;B=0.2...

más de 6 años hace | 0

| aceptada

Cargar más