Answered
How can I plot a mesh, surface or a contour from discrete vector data ?
If your data is in vector form use griddata to create 3D array x = linspace(min(X0(:)), max(X0(:)), 50); y = linspace(min(Y0(:...

6 years ago | 1

| accepted

Answered
Scaling of intensity value of captured jpg image
I'm not familiar with DICOM images but looks simple: I1 = imread('3.jpg'); I2 = rgb2gray(I1); I3 = I2-min(I2); ...

6 years ago | 0

Answered
Generation of similar vectors
What about interp1()? load data.mat y = data; x = 1:length(y); x1 = linspace(x(1),x(end),1000); y1 = interp1(x,y,x1); ...

6 years ago | 0

| accepted

Answered
How to use fillup3 to color shape?
One aproach p=[11,10,16]; q=[11,10,18]; r=[15,9,18]; M=[p;q;p;r;q;r]; i = randi(6,1,6); % mix indices cm = jet(6);...

6 years ago | 0

| accepted

Answered
Is there a way to mark a certain point a 3D plot plotted by the mesh function?
Yes. THere are a few methods: plot3(), scatter3()

6 years ago | 1

Answered
How can I add a diagonal gradient and corresponding colorbar to a plot?
An example: [X,Y] = meshgrid(1:0.1:3); Z = X+Y; pcolor(X,Y,Z) shading interp colorbar('Location','NorthOutside') You can a...

6 years ago | 0

| accepted

Answered
Plot 3D matrix with complex values
Try pcolor pcolor(A(:,1,:)) % display first matrix

6 years ago | 0

Answered
How to draw circle in a 3D space?
Another version Rotation matrix from HERE

6 years ago | 0

Answered
Scaling color with selected axis data
Why not use surf()? Color lines using patch() clc,clear % parameters x= [0:1:30]' ; y= linspace(0.1,10,length(x)) ; [X,Y...

6 years ago | 0

| accepted

Answered
Variable cannot be overwritten in an if loop
Just remove

6 years ago | 0

Answered
plot volumetric spherical coordinate data
Use isosurface to plot data at specific value example clc,clear % generate some data theta1 = linspace(-1,1,60)*pi; p...

6 years ago | 0

Answered
How to calculate left ventricle ejection fraction?
There is an example with using impoly I = imread('img1.png'); imshow(I) h = impoly; % draw polygon msk = h.c...

6 years ago | 0

| accepted

Answered
How to compute equation only for x(y>0)
Take Ew where Pw>0 Ew = (1369*((alphaa*x)+(alphar.*y)+(alphai*z)))/1000 % alphaa and alphai are constants. alphar is only one d...

6 years ago | 0

Answered
How to make a scatter plot of a 2D field in a map and add contour lines of a different field in the same map, without the contour command messing up with the color scale of the scatter command?
Max value of batim is 1000, so MATLAB automaticaly rescale color range for [0 1000] try set(gca,'Clim',[0 30])

6 years ago | 1

| accepted

Answered
How to plot in for loop?
You re comparing wrong variable if i<18.5 % maybe bmi(i) < 18.5 Forgot hold on hold on You draw all data together ins...

6 years ago | 1

| accepted

Answered
Solution of non linear equation
Maybe there is no such a and c! I used isosurface to create several combinations: clc,clear cla [a,c,y] = meshgrid(0:0.5:5)...

6 years ago | 0

| accepted

Answered
plotting a volume data in x and y plane
Use volumeslice() or contourslice()

6 years ago | 0

| accepted

Answered
Surf plot with a mask
Use CData property: [X,Y] = meshgrid(-5:5); Z = -X.^2-Y.^2; C = rand(size(Z)); surf(X,Y,Z,'Cdata',C)

6 years ago | 2

| accepted

Answered
help me to write a code for processing an audio signal using taylor series
Try gradient instead of diff dx = gradient(x); dx2 = gradient(dx); result = x + (h.*dx) + (h^2.*dx2)./factorial(2);

6 years ago | 0

| accepted

Answered
How to find the distances between two points in X-Y plane?
Use euclidean distance d = sqrt( (x2-x1).^2 + (y2-y1).^2 );

6 years ago | 2

| accepted

Answered
How to make the binarized image clearer
Pay attention that you don't extract colormap This only extracts indexed image (see workspace, I is of size [369x574x1]) I = i...

6 years ago | 0

Answered
Drawing lines like streamslice
Explanations: result See attached script

6 years ago | 0

| accepted

Answered
I need help with plotting streamlines and velocity field
Use gradient() and streamline()

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

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

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

6 years ago | 1

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

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

6 years ago | 0

Answered
color intensity showing z values
You should use griddata() and pcolor()

6 years ago | 0

Load more