Respondida
Make white portions of slice of flow data transparent
An example of how to make some faces transparent [X,Y] = meshgrid(-10:10); % generate mesh Z = -X.^2-Y.^2; ...

alrededor de 6 años hace | 0

| aceptada

Respondida
calculating and writing sorted results in matlab
Can I use the command dlmwrite with some parameters? Yes you can. example M = [1 2 3; 4 3 2]; dlmwrite('myFile.txt',M,'delim...

alrededor de 6 años hace | 0

Respondida
solving 4 equation with 4 unkowns
It's because of the way you concantenate your equations Example of two different declarations [1 - 2] ans = -1 [1 -2] ...

alrededor de 6 años hace | 0

Respondida
Tight surface meshing of 3D points
I just looped through all edges and calculated length clc,clear load points.mat ii = 1:50:size(a,1); % i reduced size of...

alrededor de 6 años hace | 0

Respondida
Function returns a vector of length 6, but the length of initial conditions vector is 34. The vector returned by ICEMODELFUNC and the initial conditions vector must have the same number of elements.
You want several solution for thetaRAD So just put your ode45 function inside for loop tspan = t0:tdelta:tf; for i = 1:length...

alrededor de 6 años hace | 0

Respondida
How created a graph from unordered node list?
Try this x = x(:); y = y(:); plot([x(source) x(target)],[y(source) y(tagrget)]) or patch function fv.vertices = [x(:) y(:)]...

alrededor de 6 años hace | 0

Respondida
How can I get velocity values for stream3 function
A short example clc,clear cla load wind [sx sy sz] = meshgrid(80,20:10:50,0:5:15); h = streamline(stream3(x,y,z,u,v,w,sx,sy...

alrededor de 6 años hace | 0

| aceptada

Respondida
Rotating projectile curve about y-axis
You can create a mesh in polar system of coordinates Assuming t = linspace(0,2*pi,30); % angle r = x; ...

alrededor de 6 años hace | 0

Respondida
Plotting a sphere consisting of planes
Use patch for this problem % create data of format % Ax Ay Az % Ax Ay Az % ... % Bx By Bz % Bx By Bz % ... % Cx Cy Cz %...

alrededor de 6 años hace | 0

Respondida
tracking object in a video
if these [X_barycentre, Y_barycentre] are coordinates of a center Use imcrop to crop the image h = 50; % side of recta...

alrededor de 6 años hace | 0

| aceptada

Respondida
What does the output of stlread function represent?
Please see

alrededor de 6 años hace | 0

| aceptada

Respondida
I have an .avi file, I want to convert it to matrix format.
Use VideoReader v = VideoReader('xylophone.mp4'); numFrames = v.NumberOfFrames; for i = 1:numFrames I = read(v,i); ...

alrededor de 6 años hace | 1

Respondida
Second derivative from a smoothing spline fit
Here you go n = 50; x = linspace(0,10,n); y = sin(x).*x; d2y = diff(y,2)./(x(2)-x(1))/2; % second derivative ix = ...

alrededor de 6 años hace | 0

| aceptada

Respondida
How to draw a 2D histogram from a time series?
My proposition A = importdata('temp_data.csv',','); temp = A.data; time = A.textdata; time(:,2) = []; time(1) = []; ...

alrededor de 6 años hace | 1

Respondida
Seperating labeled array areas using contourf
You want x,y coordinates of boundaries? Or what kind of format it should be? clc,clear load areas.mat I = (image_array); lev...

alrededor de 6 años hace | 1

| aceptada

Respondida
repeat the iteration with an error using try/catch
My proposition for iTcm=1:nTcm for iScen=1:nScen iEv = 0; while iEv <= nEv iEv = iEv + 1...

alrededor de 6 años hace | 0

Respondida
cropping a serie of images and save only the cropped part of it
Tri this (not tested) dirName = uigetdir('./', 'Select data folder'); cd(dirName); fname = sprintf('SI380820191011130728_%03...

alrededor de 6 años hace | 0

| aceptada

Respondida
2D plot to 3D Graph
I made a simple example for you x = 0:10; y = sin(x)+2; t = linspace(0,2*pi,30); [T,Y] = meshgrid(t,y); [~,X] = meshgrid(t,...

alrededor de 6 años hace | 0

| aceptada

Respondida
ode does not converge
I tried tt = [0 1]; options=odeset('RelTol',1e-3,'AbsTol',1e-3);

alrededor de 6 años hace | 0

| aceptada

Respondida
I need to get counterlines outside the U.S. removed (Ocean/Canada/Mexico)! Se script below.
Use handler options % Call contourm [~,h] = contourm(LatGrid, LonGrid, OzoneGrid); h1 = get(h,'children'); % for ...

alrededor de 6 años hace | 0

Respondida
Legend of a patch-object with a line in the center
What about this? Too complicated? No? clc,clear cla [X,Y,Z] = peaks(5); p = surf2patch(X,Y,Z); p1 = patch(p,'facecolor','g'...

alrededor de 6 años hace | 0

| aceptada

Respondida
how to plot an image and a logical matrix on same plot
Try this ind = mask > 0.8; img(ind) = max(img(:)); imshow(img)

alrededor de 6 años hace | 0

Respondida
How to create an animation by choosing rows in a matrix to switch with time. Truss simulation
Here is my achievement: i just scaled colors while moving

alrededor de 6 años hace | 0

Respondida
Finding odd and even values without functions
What about dividing? while 1 a = a/2; if abs(a-1) < 0.01 % if very close to '1' disp('even') ...

alrededor de 6 años hace | 0

| aceptada

Respondida
Adjusting the transparency of a contour plot using a gradient of alpha values
Here is my today achievement clc,clear opengl software n = 1000; [X,Y,Z] = peaks(20); % surf(X,Y,Z,'facecolor','none') hol...

alrededor de 6 años hace | 0

Respondida
Subplot titles on each column.
What about brute force? clc,clear clf subplot 121 plot(0,0) subplot 122 plot(1,1) h1 = annotation('textbox',[0.25 0.95 0....

alrededor de 6 años hace | 0

| aceptada

Respondida
I want the points that located in a certain polygon
You use different order of lan/lot. Change places in red squares

alrededor de 6 años hace | 1

| aceptada

Respondida
How do I remove all fields of a structure that have at least one NaN?
Try rmfield a = [1 nan 3]; bb = [1 2 3]; S.a = a; S.bb = bb; S nms = fieldnames(S); for i = 1:length(nms) f = getfie...

alrededor de 6 años hace | 1

Respondida
For loop on a 3D matrix to get a range of slices
Use find and sum find(sum(sum(SG,1),2)) % number of nonzero slices

alrededor de 6 años hace | 1

| aceptada

Cargar más