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

ungefär 4 timmar ago | 0

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

2 dagar 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

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

3 dagar 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)

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

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

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

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

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

5 dagar 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); %...

5 dagar 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?

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

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

5 dagar 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;...

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

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

6 dagar 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); % ...

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

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

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

6 dagar 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

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

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

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

8 dagar ago | 0

| accepted

Answered

How does the function "mesh" work?

Since you didn't specify X and Y for mesh() [m,n] = size(b); [X,Y] = meshgrid(1:m,1:n); mesh(X,Y,b) Is that you wanted to kn...

How does the function "mesh" work?

Since you didn't specify X and Y for mesh() [m,n] = size(b); [X,Y] = meshgrid(1:m,1:n); mesh(X,Y,b) Is that you wanted to kn...

8 dagar ago | 0

Answered

Is there a way to reduce compilation time for this segment?

See if it works

Is there a way to reduce compilation time for this segment?

See if it works

8 dagar ago | 0

| accepted

Answered

How to plot this implicit function

Try symbolic expression clc,clear alpha=1.5; A=0.0207; gamma=0.25; syms beta eps x = (beta-alpha*(beta-gamma)+sqrt((beta-a...

How to plot this implicit function

Try symbolic expression clc,clear alpha=1.5; A=0.0207; gamma=0.25; syms beta eps x = (beta-alpha*(beta-gamma)+sqrt((beta-a...

8 dagar ago | 0

| accepted

Answered

Plotting infinite series with set of parameters

Looks like simple sin() or cos(): What do you think? Try my script, i think i reached a success

Plotting infinite series with set of parameters

Looks like simple sin() or cos(): What do you think? Try my script, i think i reached a success

8 dagar ago | 1

| accepted