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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

Beantwortet
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(:)]...

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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); ...

etwa 6 Jahre vor | 1

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

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
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) = []; ...

etwa 6 Jahre vor | 1

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

etwa 6 Jahre vor | 1

| akzeptiert

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

Beantwortet
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

etwa 6 Jahre vor | 0

Beantwortet
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') ...

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 0

| akzeptiert

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

etwa 6 Jahre vor | 1

| akzeptiert

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

etwa 6 Jahre vor | 1

Beantwortet
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

etwa 6 Jahre vor | 1

| akzeptiert

Mehr laden