Answered

Quiver Transparency and Shape

use patch to manipulate edgeAlpha cla t = linspace(0,2*pi,30); [x,y] = pol2cart(t,1); patch(x,y,t,'edgealpha',0.5,... '...

Quiver Transparency and Shape

use patch to manipulate edgeAlpha cla t = linspace(0,2*pi,30); [x,y] = pol2cart(t,1); patch(x,y,t,'edgealpha',0.5,... '...

4 months ago | 0

Answered

How I make my phase portrait for several initial condition?

Here is a simple example x0 = [1 2 3]; for i = 1:length(x0) [t,x] = ode45(f,[0 2],x0(i)); line(t,x) end

How I make my phase portrait for several initial condition?

Here is a simple example x0 = [1 2 3]; for i = 1:length(x0) [t,x] = ode45(f,[0 2],x0(i)); line(t,x) end

4 months ago | 1

Answered

How to solve 2 equations with 2 unknowns and for Loop

remove all (i) parts try vpasolve (numerical solver) insteaf of solve (symbolical solver). Your equations can be too complicate...

How to solve 2 equations with 2 unknowns and for Loop

remove all (i) parts try vpasolve (numerical solver) insteaf of solve (symbolical solver). Your equations can be too complicate...

4 months ago | 0

Answered

How to get XYZ coordinates of a 3D image (.obj)

use get x = get(obj,'xdata');

How to get XYZ coordinates of a 3D image (.obj)

use get x = get(obj,'xdata');

4 months ago | 0

Answered

What is wrong with my code? I have to find value of x(20 sec), y(20 sec) & z(20 sec). The correct answers are: x(20) = 0.704, y(20) = 0.665, z(20) = 0.246.

mistake

What is wrong with my code? I have to find value of x(20 sec), y(20 sec) & z(20 sec). The correct answers are: x(20) = 0.704, y(20) = 0.665, z(20) = 0.246.

mistake

4 months ago | 1

| accepted

Answered

How to find the area if the traced are in the graph graph?

select points you need use trapz or polyarea y = [40 40 30 20 15 15 22 33 46 56 48 26 20 20]; x = [1 2 3 4 5 6 7 8 9 10 11 12...

How to find the area if the traced are in the graph graph?

select points you need use trapz or polyarea y = [40 40 30 20 15 15 22 33 46 56 48 26 20 20]; x = [1 2 3 4 5 6 7 8 9 10 11 12...

4 months ago | 1

| accepted

Answered

I was wondering if this code could be vectorized, and if so, can it be done without conditionals or loops? It would be great if the vectorized form could be written out so that I could run and follow

use impoly to create triangle region tri = ones(height); imshow(tri) p = impoly(gca,[0 1; 1/2 0; 1 1]*height); tri1 = p.crea...

I was wondering if this code could be vectorized, and if so, can it be done without conditionals or loops? It would be great if the vectorized form could be written out so that I could run and follow

use impoly to create triangle region tri = ones(height); imshow(tri) p = impoly(gca,[0 1; 1/2 0; 1 1]*height); tri1 = p.crea...

4 months ago | 1

Answered

How can I color the region bounded by two level curves of countour plots?

extract data from contour function use polyxpoly to find intersection segments

How can I color the region bounded by two level curves of countour plots?

extract data from contour function use polyxpoly to find intersection segments

4 months ago | 0

| accepted

Answered

How to divide a closed detected edge of an image into 8 parts from a point inside in it..?

use bwboundaries to get coordinates of a circle divide into equal parts x(1:end/8)

How to divide a closed detected edge of an image into 8 parts from a point inside in it..?

use bwboundaries to get coordinates of a circle divide into equal parts x(1:end/8)

4 months ago | 0

Answered

Plotting 3D Animation from 4-D Data

Here is the start clc,clear load 4D_Data.mat % initialization of surfaces for j = 1:size(T_adi,3) h(j) = surface(...

Plotting 3D Animation from 4-D Data

Here is the start clc,clear load 4D_Data.mat % initialization of surfaces for j = 1:size(T_adi,3) h(j) = surface(...

4 months ago | 0

| accepted

Answered

How can I count scatter data surrounded by shapes?

Use inpolygon

How can I count scatter data surrounded by shapes?

Use inpolygon

4 months ago | 0

| accepted

Answered

How to solve this fourier series/ boundary value on matlab?

here is a start function res = f(t) if t < 1 res = t; elseif t < 2 res = 1; else res = 3-t; end end and us...

How to solve this fourier series/ boundary value on matlab?

here is a start function res = f(t) if t < 1 res = t; elseif t < 2 res = 1; else res = 3-t; end end and us...

4 months ago | 0

Answered

3D-Surface between 2 lines.

what about this? xf = [xl2(1) xl2(5) xl1(4) xl1(5)]; yf = [yl2(1) yl2(5) yl1(4) yl1(5)];

3D-Surface between 2 lines.

what about this? xf = [xl2(1) xl2(5) xl1(4) xl1(5)]; yf = [yl2(1) yl2(5) yl1(4) yl1(5)];

4 months ago | 0

| accepted

Answered

Custering data by color

here is an example. Adapt it for you needs % generate some data t = linspace(0,2*pi,1e4)'; x = cos(50*t) + 0.8*cos(t); y = s...

Custering data by color

here is an example. Adapt it for you needs % generate some data t = linspace(0,2*pi,1e4)'; x = cos(50*t) + 0.8*cos(t); y = s...

4 months ago | 1

| accepted

Answered

How to find data points from a 3D plotted graph in MATLAB

use griddata y1 = griddata(X,Z,Y,x1,z1);

How to find data points from a 3D plotted graph in MATLAB

use griddata y1 = griddata(X,Z,Y,x1,z1);

4 months ago | 0

| accepted

Answered

How to put X on intersecting points and find an angle

Try this script

How to put X on intersecting points and find an angle

Try this script

4 months ago | 1

| accepted

Answered

How to divide a graph into 8 equal region and assign a number for each region?

Here is the start x = 0:.2:20; x = [x'; nan]; % add 'NaN' to break the line y = sin(x); c = round( (1:length(x))/length...

How to divide a graph into 8 equal region and assign a number for each region?

Here is the start x = 0:.2:20; x = [x'; nan]; % add 'NaN' to break the line y = sin(x); c = round( (1:length(x))/length...

4 months ago | 0

Answered

Obtain data points from plot using 'buttondownfcn' nested functions

Here is an example function main x = rand(100,1); % generate random data y = rand(100,1); h = plot(x,y...

Obtain data points from plot using 'buttondownfcn' nested functions

Here is an example function main x = rand(100,1); % generate random data y = rand(100,1); h = plot(x,y...

4 months ago | 0

| accepted

Answered

ode45 error rungg- kutta

You probably run the code in a wrong way. Here are some changes

ode45 error rungg- kutta

You probably run the code in a wrong way. Here are some changes

4 months ago | 0

| accepted

Answered

Extracting data from a graph image using 'ginput'

here is an example x = rand(100,1); % generate some data y = rand(100,1); plot(x,y,'.r') p = ginput(1); d ...

Extracting data from a graph image using 'ginput'

here is an example x = rand(100,1); % generate some data y = rand(100,1); plot(x,y,'.r') p = ginput(1); d ...

4 months ago | 0

Answered

By tonight I'd like to create an image from RGB data in a file

I think you are looking for griddata

By tonight I'd like to create an image from RGB data in a file

I think you are looking for griddata

4 months ago | 0

Answered

How to Seperate Region of Interest into 3 Segments

Adapt this example for your needs [x,y] = meshgrid(1:100); I0 = (x-50).^2/4 + (y-50).^2 < 20^2; % create ellipse [i1,j1] =...

How to Seperate Region of Interest into 3 Segments

Adapt this example for your needs [x,y] = meshgrid(1:100); I0 = (x-50).^2/4 + (y-50).^2 < 20^2; % create ellipse [i1,j1] =...

4 months ago | 0

Answered

How do I select a region on a 3D plot and extract the indices of the enclosed points?

Here is the script that sould be helpfull

How do I select a region on a 3D plot and extract the indices of the enclosed points?

Here is the script that sould be helpfull

4 months ago | 0

Answered

Can anyone help with this error? (I just want to see the contour of the bluish area at the bottom of the image)

Detect blue region properly I0 = imread('frame75.jpg'); I1 = double(I0); % colors from blue region R = [80 50 0]; G = [...

Can anyone help with this error? (I just want to see the contour of the bluish area at the bottom of the image)

Detect blue region properly I0 = imread('frame75.jpg'); I1 = double(I0); % colors from blue region R = [80 50 0]; G = [...

4 months ago | 0

| accepted

Answered

How to Plot Stress Contour??

Reshape your data to create a matrix stress = reshape(Sigma_X,6,3); And use pcolor [x,y] = meshgrid(1:3,1:6); Sigma_X = 1.0e...

How to Plot Stress Contour??

Reshape your data to create a matrix stress = reshape(Sigma_X,6,3); And use pcolor [x,y] = meshgrid(1:3,1:6); Sigma_X = 1.0e...

4 months ago | 0

Answered

How to draw circles at the start of a video and display these circles again at specified framecounts?

You already wrote if statement for the first frame if framecount == 1 Add another condition for each 5 frame if framecount ==...

How to draw circles at the start of a video and display these circles again at specified framecounts?

You already wrote if statement for the first frame if framecount == 1 Add another condition for each 5 frame if framecount ==...

4 months ago | 0

Answered

Counting line particales in an image

binarize image use imopen to remove thin objects (lines) detect lines use bwlabel to calculate the number of lines

Counting line particales in an image

binarize image use imopen to remove thin objects (lines) detect lines use bwlabel to calculate the number of lines

4 months ago | 0

Answered

I have surface data stored in faces and vertices. How to extract data in a slice (or 2D plane) from this Faces and vertices data?

Use interp2 [x,y,z] = peaks(20); x1 = linspace(min(x(:)),max(x(:)),20); y1 = sin(x1); z1 = interp2(x,y,z,x1,y1); surf(x,y,z...

I have surface data stored in faces and vertices. How to extract data in a slice (or 2D plane) from this Faces and vertices data?

Use interp2 [x,y,z] = peaks(20); x1 = linspace(min(x(:)),max(x(:)),20); y1 = sin(x1); z1 = interp2(x,y,z,x1,y1); surf(x,y,z...

4 months ago | 0