Answered

How to make a directed, circular chord plot in MATLAB

Here is a simple method how to draw arcs see attached script

How to make a directed, circular chord plot in MATLAB

Here is a simple method how to draw arcs see attached script

alrededor de 14 horas ago | 0

Answered

Which Area is in right/left side of the other

If you are moving along the line you can get direction vector Then to pick any point left to line: Any point right to line...

Which Area is in right/left side of the other

If you are moving along the line you can get direction vector Then to pick any point left to line: Any point right to line...

alrededor de 15 horas ago | 1

| accepted

Answered

Subplots with multiple axes

I think you mean this n = 10; % 10 subplot but only 4 of them are used ? subplot(1,n,1); plot(x,y,'.-'); subplot...

Subplots with multiple axes

I think you mean this n = 10; % 10 subplot but only 4 of them are used ? subplot(1,n,1); plot(x,y,'.-'); subplot...

alrededor de 16 horas ago | 0

Answered

Make Random Walk into 3D

I do this dt = .01; [x, y, z] = deal( 0 ); [X,Y,Z] = sphere(30); surf(X,Y,Z,'edgecolor',[1 1 1]*0.8,'Facecolor','none') h...

Make Random Walk into 3D

I do this dt = .01; [x, y, z] = deal( 0 ); [X,Y,Z] = sphere(30); surf(X,Y,Z,'edgecolor',[1 1 1]*0.8,'Facecolor','none') h...

alrededor de 17 horas ago | 0

Answered

How to get values at different interval for ode45

Use for loop to get results for x = 0: 0.1: 1 (11 curves) hold on for x = 0:0.1:1 [t,u] = ode45(@equation, [0 1], [x 0]) p...

How to get values at different interval for ode45

Use for loop to get results for x = 0: 0.1: 1 (11 curves) hold on for x = 0:0.1:1 [t,u] = ode45(@equation, [0 1], [x 0]) p...

alrededor de 17 horas ago | 0

Answered

How can I find maximums in the intensity profile and display it in the original image ?

I think the problem is in order of points. MAthworks help: improfile Pixel-value cross-sections along line segments Try this ...

How can I find maximums in the intensity profile and display it in the original image ?

I think the problem is in order of points. MAthworks help: improfile Pixel-value cross-sections along line segments Try this ...

2 días ago | 1

| accepted

Answered

colored Line plot according to a third variable

clc,clear % generate some data x = linspace(0,10,10); y = x.^2; x = [ x nan ]; % i added nan for 'patch...

colored Line plot according to a third variable

clc,clear % generate some data x = linspace(0,10,10); y = x.^2; x = [ x nan ]; % i added nan for 'patch...

4 días ago | 0

Answered

Drawing a circle of ones by using a pre-defined grid with pcolor

Z1 = R <= a^2; % place ones Gauss shape Place R isntead of x

Drawing a circle of ones by using a pre-defined grid with pcolor

Z1 = R <= a^2; % place ones Gauss shape Place R isntead of x

5 días ago | 0

| accepted

Answered

Amplitudes or seat to head transmissibilities calculation? i wrote a code based on some already optimized parameters to calculate amplitude ratios but curve is not matching can any one help me to find out where is the mistake

These matrices look like symmetric except: >> C-C' ans = 0 0 0 0 0 0 0 0 0 0 0...

Amplitudes or seat to head transmissibilities calculation? i wrote a code based on some already optimized parameters to calculate amplitude ratios but curve is not matching can any one help me to find out where is the mistake

These matrices look like symmetric except: >> C-C' ans = 0 0 0 0 0 0 0 0 0 0 0...

6 días ago | 0

| accepted

Answered

Relative Displacement and Velocity

Here is said that x3 and x4 - velocities So i'd just do: v3 = x(:,3); v4 = x(:,4); plot(t,v3./v4)

Relative Displacement and Velocity

Here is said that x3 and x4 - velocities So i'd just do: v3 = x(:,3); v4 = x(:,4); plot(t,v3./v4)

6 días ago | 0

Answered

ode45 2 degree of freedom

Take a closer look on example from MATLAB help I suggest you to comment these lines (or remove) since you are using odeToVect...

ode45 2 degree of freedom

Take a closer look on example from MATLAB help I suggest you to comment these lines (or remove) since you are using odeToVect...

6 días ago | 0

Answered

How to convert Temperature maps into rgb images

This should work n = 100; % number of colors mycolor = jet(n); ...

How to convert Temperature maps into rgb images

This should work n = 100; % number of colors mycolor = jet(n); ...

7 días ago | 0

| accepted

Answered

Bilinear interpolation of gridded data

Hi! This how i do this clc,clear load Variables.mat [m,n,k] = size(predictor); lon = linspace(59.06,120.93, m); lat = l...

Bilinear interpolation of gridded data

Hi! This how i do this clc,clear load Variables.mat [m,n,k] = size(predictor); lon = linspace(59.06,120.93, m); lat = l...

7 días ago | 0

| accepted

Answered

Rotate Spherical Cap On Sphere

I rotated data about X axis first (theta angle). Then i am rotating about Z (phi angle) clc,clear p = linspace(0,2*pi,50); ...

Rotate Spherical Cap On Sphere

I rotated data about X axis first (theta angle). Then i am rotating about Z (phi angle) clc,clear p = linspace(0,2*pi,50); ...

7 días ago | 0

| accepted

Answered

How to use streamline function?

Couldn't figure out why streamline didn't work But something similar like stream can be written manually See attached script ...

How to use streamline function?

Couldn't figure out why streamline didn't work But something similar like stream can be written manually See attached script ...

7 días ago | 0

Answered

how to mask certain regions when using superpixel

Try this simple example clc,clear A = imread('image.png'); [L,NumLabels] = superpixels(A,N); ix = find(L == 1); %...

how to mask certain regions when using superpixel

Try this simple example clc,clear A = imread('image.png'); [L,NumLabels] = superpixels(A,N); ix = find(L == 1); %...

7 días ago | 0

| accepted

Answered

Plotting 3D thoroidal field streamline

I used quiver3 Can't you just draw circles if it is that straight?

Plotting 3D thoroidal field streamline

I used quiver3 Can't you just draw circles if it is that straight?

8 días ago | 1

| accepted

Answered

Video file of changing solid colors

TRY HexCodes = VideoWriter('\Users\~\Documents\MATLAB\Hexcode_Colors.mp4','MPEG-4'); HexCodes.FrameRate = 30; % Frames ...

Video file of changing solid colors

TRY HexCodes = VideoWriter('\Users\~\Documents\MATLAB\Hexcode_Colors.mp4','MPEG-4'); HexCodes.FrameRate = 30; % Frames ...

8 días ago | 0

Answered

Error using vertcat Dimensions of arrays being concatenated are not consistent.

MATLAB doesn't know if SP_others is column or row vector. By default - row SP_others(i)=sum(exp(h),2)./m ; Then you are trying...

Error using vertcat Dimensions of arrays being concatenated are not consistent.

MATLAB doesn't know if SP_others is column or row vector. By default - row SP_others(i)=sum(exp(h),2)./m ; Then you are trying...

8 días ago | 0

Answered

Hatch Pattern inside a circumference

Try this clc,clear % generate points on the circel with equal spaces y = linspace(-1,1,20); x = sqrt(1-y.^2); a = 20;...

Hatch Pattern inside a circumference

Try this clc,clear % generate points on the circel with equal spaces y = linspace(-1,1,20); x = sqrt(1-y.^2); a = 20;...

8 días ago | 2

| accepted

Answered

How to compute the ratio of the insection point in each grid on the boundary of a real structure

'That's why I try to subgrid the current one pixel into 10 smaller grids and determine whether each point is inside the circel o...

How to compute the ratio of the insection point in each grid on the boundary of a real structure

'That's why I try to subgrid the current one pixel into 10 smaller grids and determine whether each point is inside the circel o...

8 días ago | 0

Answered

Division of a vector

Try clusterdata() load WorkSpace X = Zone_1_Overlap_Complete_Not_Zeros(:,1); Y = Zone_1_Overlap_Complete_Not_Zeros(:,2); idx...

Division of a vector

Try clusterdata() load WorkSpace X = Zone_1_Overlap_Complete_Not_Zeros(:,1); Y = Zone_1_Overlap_Complete_Not_Zeros(:,2); idx...

8 días ago | 1

| accepted

Answered

how to vectorize nested for loops

IS it correct? for m=1:s(1) for n=1:s(2) cond = RepSol(1:s(1),1:s(2)) == RepSol((1:s(1))+m-1,(1:s(2))+n-1); % ...

how to vectorize nested for loops

IS it correct? for m=1:s(1) for n=1:s(2) cond = RepSol(1:s(1),1:s(2)) == RepSol((1:s(1))+m-1,(1:s(2))+n-1); % ...

8 días ago | 0

Answered

Matlab plot recording to a video

Example clc,clear x = linspace(0,10); y = sin(x) + 0.1*cos(10*x); fid = figure; h1 = gca; plot(x,y); hold on h2 = a...

Matlab plot recording to a video

Example clc,clear x = linspace(0,10); y = sin(x) + 0.1*cos(10*x); fid = figure; h1 = gca; plot(x,y); hold on h2 = a...

8 días ago | 0

Answered

Making moving obstacles in an matlab

After long 7 month of training and research i reached a success. Here is what i've achieved clc,clear px = 5*rand(10,1); ...

Making moving obstacles in an matlab

After long 7 month of training and research i reached a success. Here is what i've achieved clc,clear px = 5*rand(10,1); ...

8 días ago | 0

| accepted

Answered

Multiple summations in one formula

Shorter version clc,clear Yit = repmat( mean(Yijt,2), [1 N 1] ); % get mean and make 3D matrix Yi = mean(mean(Yijt,2),3); ...

Multiple summations in one formula

Shorter version clc,clear Yit = repmat( mean(Yijt,2), [1 N 1] ); % get mean and make 3D matrix Yi = mean(mean(Yijt,2),3); ...

9 días ago | 1

Answered

Solving a parametererised equation that can't be done analytically

You can extract data from ezplot (Walter's answer) See attached script

Solving a parametererised equation that can't be done analytically

You can extract data from ezplot (Walter's answer) See attached script

9 días ago | 0

Answered

Create a single 4D uint array from a image folder

Example n = 10; % number of images I_many = zeros(480, 640, 3, n); for i = 1:n s = sprintf('Folder%d/image.pn...

Create a single 4D uint array from a image folder

Example n = 10; % number of images I_many = zeros(480, 640, 3, n); for i = 1:n s = sprintf('Folder%d/image.pn...

9 días ago | 0

Answered

Is there a way to overcome For loops for fast processing?

See attached script clc, clear A = imread('masson.jpg'); subplot(1,2,1) imshow(A) RGB = [40 120 40]; % color you w...

Is there a way to overcome For loops for fast processing?

See attached script clc, clear A = imread('masson.jpg'); subplot(1,2,1) imshow(A) RGB = [40 120 40]; % color you w...

9 días ago | 1

Answered

Plotting Contour with point coordinates

Arc-length interpolation L = sqrt(diff(x).^2 + diff(y).^2); t = [0 cumsum(L)]; t1 = linspace(0,t(end),50); x1 = spline(t,x,t...

Plotting Contour with point coordinates

Arc-length interpolation L = sqrt(diff(x).^2 + diff(y).^2); t = [0 cumsum(L)]; t1 = linspace(0,t(end),50); x1 = spline(t,x,t...

10 días ago | 0

| accepted