Answered

I need help with plotting streamlines and velocity field

Use gradient() and streamline()

I need help with plotting streamlines and velocity field

Use gradient() and streamline()

16 hours ago | 0

Answered

How can I intersect a line and a 3D object (cube, sphere, prism)?

It is a pyramid. If you want to know if line intersects pyramid you should inspect each plane of it Once you have all interse...

How can I intersect a line and a 3D object (cube, sphere, prism)?

It is a pyramid. If you want to know if line intersects pyramid you should inspect each plane of it Once you have all interse...

17 hours ago | 0

Answered

Full fill a rectangle shape in an image

Use convhull or boundary to get contour of your figure Then use inpolygon to fill this shape

Full fill a rectangle shape in an image

Use convhull or boundary to get contour of your figure Then use inpolygon to fill this shape

18 hours ago | 0

| accepted

Answered

Do the isosurfaces merely indicate a single value or do they contain information on all the value above the threshold?

You should plot multiple isosurfaces since isovalue should be a scalar YOu can use for loop for that purpose

Do the isosurfaces merely indicate a single value or do they contain information on all the value above the threshold?

You should plot multiple isosurfaces since isovalue should be a scalar YOu can use for loop for that purpose

1 day ago | 0

Answered

How to color the area between lines that are vectors, no functions

I created some figure and lines I rotated lines and created new figure (yellow) Painted faces to white and removed edg...

How to color the area between lines that are vectors, no functions

I created some figure and lines I rotated lines and created new figure (yellow) Painted faces to white and removed edg...

1 day ago | 0

Answered

Setting the distance between 2 lines?

What about for loop? width = 10; dist = 10; x0 = 0; hold on for i = 1:4 xline(x0+(width+dist)*i,'Linewidth',width) en...

Setting the distance between 2 lines?

What about for loop? width = 10; dist = 10; x0 = 0; hold on for i = 1:4 xline(x0+(width+dist)*i,'Linewidth',width) en...

1 day ago | 0

Answered

How can I Write a program that determines how many real roots are expected out of the quadratic equation (ax2 + bx+ c = 0) with corresponding inputs. When a user runs the file it should ask for the values of the constants a, b, and c.

I made a printscreen for you From this page: LINK Look carefully on your if statement

How can I Write a program that determines how many real roots are expected out of the quadratic equation (ax2 + bx+ c = 0) with corresponding inputs. When a user runs the file it should ask for the values of the constants a, b, and c.

I made a printscreen for you From this page: LINK Look carefully on your if statement

1 day ago | 0

Answered

Write string into excel

I suggest you to write all you want in cell array then write it to Excel file A = cell(5,1); % preallocate cell ...

Write string into excel

I suggest you to write all you want in cell array then write it to Excel file A = cell(5,1); % preallocate cell ...

1 day ago | 0

Answered

could anyone help me how to display all the numbers inaddition to the numbers present.

I'd divide you task in several steps: Use for loop to consider each row separately Use ismember() to identificate which number...

could anyone help me how to display all the numbers inaddition to the numbers present.

I'd divide you task in several steps: Use for loop to consider each row separately Use ismember() to identificate which number...

1 day ago | 0

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

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

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

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

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

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

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

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

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

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

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

8 days 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); ...

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

8 days 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); ...

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

9 days 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); %...

9 days 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?

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

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

9 days 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;...

9 days ago | 2

| accepted