Answered
Trying to solve motion equation using ODE45
The problem Try this modifications [t,y] = ode45(@vdp1,[0 1e-6],[2900 ; 0]);

6 years ago | 0

Answered
imagesc from 1D array with coordinates and values
Use griddata

6 years ago | 0

Answered
Add 3 trendlines in a scatterplot figure
Use polyfit a1 = polyfit(Time,A,1); A1 = polyval(a1,Time); plot(Time,A1)

6 years ago | 0

Answered
How to create a line around the earth map and then getting the location of a specific point on it?
Here is a start: draw sphere, draw circle. Pick the point you want Now you need axis of rotation to rotate your circle - use...

6 years ago | 0

| accepted

Answered
for loop that loops through a changing paramter of ode45
Here is the problem

6 years ago | 0

Answered
How to plot an ODE?
Use for loop to solve equation 5 times for each n n = [1 2 3 5 inf]; f = @(t,y,n) 1-t/n+y; for i = 1:length(n) [t,y] = o...

6 years ago | 0

| accepted

Answered
Index exceeds the number of array element (2). Anyone can help me??
I think it happens because index size is changing Suppose size of index is 15. You enter for loop, numel(index)=15 BUt when...

6 years ago | 1

| accepted

Answered
How to customize rectangular face meshing for 3D model?
If model is simple it can be created in MATLAB t = linspace(0,2*pi,30); z = linspace(0,10,20); [x,y] = pol2cart(t,1); [X,Z] ...

6 years ago | 0

Answered
Slice and streamslice along diagonal
Try this simple example [x,y,z,v] = flow; [Z,Y] = meshgrid(-3:0.5:3); X = 3+(Z.^2+Y.^2)/5; slice(x,y,z,v,X,Y,Z) hold on sl...

6 years ago | 1

| accepted

Answered
Plot straight line between points
Try this solution

6 years ago | 0

Answered
Error using sym/subsindex (line 853) while using symsum
Try this solution

6 years ago | 0

| accepted

Answered
Plotting thickness data to a cylinder.
Use this A = xlsread('test matlab.xlsx'); %% x = A(:,2); y = A(:,3); T = A(:,5:end); z = 1:size(t,2); % 1 2 3 ....

6 years ago | 1

| accepted

Answered
How can I solve a algebraic equation with "fzero" ?
So you want to have 3 independent variables: , and Here is one way: use isosurface S=0.7; a=0; m=1; k1=0.01:0.05:2.01;% k= ...

6 years ago | 0

| accepted

Answered
Rock Being Launched in a Pool
See this solution

6 years ago | 0

Answered
Is there a way to read only two columns of a file with textscan?
Read whole data using importdata or readtable and choose only columns you want

6 years ago | 0

Answered
Change The values of points between two lines
Connect lines and use inpolygon

6 years ago | 0

| accepted

Answered
How do I find the overlapping volume of multiple 3D rectangles?
Try this simple script clc,clear % generate some data [x1,y1,z1] = meshgrid([0 10]); [x2,y2,z2] = meshgrid([4 15]); y...

6 years ago | 0

| accepted

Answered
How can I get N to be a different value for a different t?
Try this modification

6 years ago | 0

Answered
How to convert the table with x,y, and value to image?
Try for loop for i = 1:length(x) A(y(i),x(i)) = v(i); end imshow(A)

6 years ago | 0

Answered
Change color of points if the coordinates are the same
Look on this idea create matrix round data (snap to grid) Fill matrix like for i = 1:100 A(y(i),x(i)) = A(y(i),x(i)...

6 years ago | 0

Answered
How to find a data based on specific range of specific column?
use logical operators % T - your table ix = 30 < T(:,1) & T(:,1) < 36; % indices T(ix,:) % r...

6 years ago | 0

| accepted

Answered
Export the workspace exactly as displayed to Excel?
try this for i = 1:3 str = sprintf('image46%d',i+43); % name of new sheet xlswrite('data.xlsx',rand(5), str); ...

6 years ago | 0

Answered
How to reduce the solution to one expression
Try this solution

6 years ago | 0

Answered
How to make an array of function outputs?
Try this solution

6 years ago | 0

| accepted

Answered
Help with HW please
See this witty trick x = 0:.1:20; y = sin(x); y1 = y; y1(y1<0.5) = nan; plot(x,y,x,y1,'.-r') result

6 years ago | 0

Answered
How to calculate the "half" distance within peaks
Concantenate indices of each peak and sort them ix = sort([ix1 ix2]); % sort all indices n = round(length(ix)/2)*2; ...

6 years ago | 0

| accepted

Load more