Answered

how can i find the distance from the peak of one wave to another wave in a image?

I suggest next algorithm imcrop region of interest (since it's always at the same position imbinarize image maybe clear a bit...

how can i find the distance from the peak of one wave to another wave in a image?

I suggest next algorithm imcrop region of interest (since it's always at the same position imbinarize image maybe clear a bit...

2 hours ago | 0

Answered

How can I centre points of interest in an image before it's cropped and saved?

You previous code was ok i think. Just made some changes [ii,jj] = find(I5); % calculate boundaries i1 = min(ii); %...

How can I centre points of interest in an image before it's cropped and saved?

You previous code was ok i think. Just made some changes [ii,jj] = find(I5); % calculate boundaries i1 = min(ii); %...

3 hours ago | 0

| accepted

Answered

solving a system of equations where some variables are linked to a function

I tried fsolve %%variables that are known. m_3=0.004 ; h_3=1530; y_3=0.62; To=25+273; P_c=1.5 ; UA=0.5; hfg2=2256; ...

solving a system of equations where some variables are linked to a function

I tried fsolve %%variables that are known. m_3=0.004 ; h_3=1530; y_3=0.62; To=25+273; P_c=1.5 ; UA=0.5; hfg2=2256; ...

6 hours ago | 0

Answered

2D Temperature Distribution

I made some changes in your code X = 10; Y = 10; theta1 = zeros(X,Y); for n =1:100 theta1 = theta1 + (2/pi)*(((-1)^(n+1...

2D Temperature Distribution

I made some changes in your code X = 10; Y = 10; theta1 = zeros(X,Y); for n =1:100 theta1 = theta1 + (2/pi)*(((-1)^(n+1...

19 hours ago | 0

Answered

Max of vector in higher dimensional array subject to constraints

Use max() B = max(A,[],3);

Max of vector in higher dimensional array subject to constraints

Use max() B = max(A,[],3);

19 hours ago | 0

Answered

Plot straight lines between the data points in the same colour as the data points with lots of NaN values

Remove NaN? ind = ~isnan(y); plot(x(ind),y(ind),'or') Remember about accepting the answer if it helps

Plot straight lines between the data points in the same colour as the data points with lots of NaN values

Remove NaN? ind = ~isnan(y); plot(x(ind),y(ind),'or') Remember about accepting the answer if it helps

19 hours ago | 0

| accepted

Answered

Transform RGB image to grayscale but keep format as RBG

You can use repmat or cat to create 3D matrix I1 = rgb2gray(I); I2 = cat(3,I1,I1,I1); % gray image as 3D matrix %I2 = r...

Transform RGB image to grayscale but keep format as RBG

You can use repmat or cat to create 3D matrix I1 = rgb2gray(I); I2 = cat(3,I1,I1,I1); % gray image as 3D matrix %I2 = r...

19 hours ago | 0

Answered

Excel data set to vectors

Use quiver function u1 = diff(x1); v1 = diff(y1); plot(x,y,'.r') hold on quiver(x1(1:end-1),y1(1:end-1),u1,v1) hold off

Excel data set to vectors

Use quiver function u1 = diff(x1); v1 = diff(y1); plot(x,y,'.r') hold on quiver(x1(1:end-1),y1(1:end-1),u1,v1) hold off

20 hours ago | 0

| accepted

Answered

How to rotate a rectangle

If you open (Ctrl+D) rotate function you will find these lines at the end: if strcmp(t,'surface') || strcmp(t,'line') se...

How to rotate a rectangle

If you open (Ctrl+D) rotate function you will find these lines at the end: if strcmp(t,'surface') || strcmp(t,'line') se...

21 hours ago | 0

Answered

How to solve a differential equation system with ode15s

I made some correcitons. Try now

How to solve a differential equation system with ode15s

I made some correcitons. Try now

21 hours ago | 0

| accepted

Answered

Extract sub-matrix compute correlation coefficient 2D case iteratively

Sometimes i+1 > numcols. What will happen then? (RED) Left side has one number, right one - 4. (GREEN)

Extract sub-matrix compute correlation coefficient 2D case iteratively

Sometimes i+1 > numcols. What will happen then? (RED) Left side has one number, right one - 4. (GREEN)

24 hours ago | 0

Answered

How can I solve a system of differential equations including a bounded proportional controller?

Interpolate TL to choose correct value Don't use y(4) for Ct function dy=freylaw(t,y,time_min,TL) L=10; ...

How can I solve a system of differential equations including a bounded proportional controller?

Interpolate TL to choose correct value Don't use y(4) for Ct function dy=freylaw(t,y,time_min,TL) L=10; ...

1 day ago | 0

| accepted

Answered

Solve equations in a loop with fsolve

This is the correct form tau = 0.1 f4 = [3; 2; 6; 8] f8 = [2; 6; 7; 3] eq = @(s,f4,f8) s*tau-(0.1.*s^2+3.54.*s-9.53).*f4.^2...

Solve equations in a loop with fsolve

This is the correct form tau = 0.1 f4 = [3; 2; 6; 8] f8 = [2; 6; 7; 3] eq = @(s,f4,f8) s*tau-(0.1.*s^2+3.54.*s-9.53).*f4.^2...

1 day ago | 0

Answered

How to adjust colors of animated plot3 over time

Try this n = 100; colors = jet(100); x = linspace(0,10,n); y = sin(x); cla xlim([min(x) max(x)]) ylim([min(y) max(y)]) ...

How to adjust colors of animated plot3 over time

Try this n = 100; colors = jet(100); x = linspace(0,10,n); y = sin(x); cla xlim([min(x) max(x)]) ylim([min(y) max(y)]) ...

2 days ago | 0

Answered

2-D conduction in a aluminum plate

Your equation: Can be re-written as (difference scheme): You should express while 1 % loop until toler...

2-D conduction in a aluminum plate

Your equation: Can be re-written as (difference scheme): You should express while 1 % loop until toler...

2 days ago | 1

| accepted

Answered

Plotting a Graph with Shapes and Colours

An example h1 = plot(1,1,'.r'); % red point hold on h2 = plot(2,2,'.b'); % blue point hold off legend...

Plotting a Graph with Shapes and Colours

An example h1 = plot(1,1,'.r'); % red point hold on h2 = plot(2,2,'.b'); % blue point hold off legend...

2 days ago | 1

| accepted

Answered

How to plot error ellipses on the head of the quiver's arrows?

So my dataset is made of six coloumns: latitude, longitude, horizontal velocity, vertical velocity, horizontal uncertainty and v...

How to plot error ellipses on the head of the quiver's arrows?

So my dataset is made of six coloumns: latitude, longitude, horizontal velocity, vertical velocity, horizontal uncertainty and v...

2 days ago | 0

Answered

Trying to automatically crop an image into several smaller images based on segmentation

Something like this clc,clear I = imread('image.jpeg'); I1 = im2bw(I); I2 = imdilate(I1,ones(5)); % imdilate to close...

Trying to automatically crop an image into several smaller images based on segmentation

Something like this clc,clear I = imread('image.jpeg'); I1 = im2bw(I); I2 = imdilate(I1,ones(5)); % imdilate to close...

2 days ago | 1

| accepted

Answered

Plot with symbolic value on x axis

Use numeric values to plot Use symbolic values to make labels h = plot(x,y) syms T x1 = x*T; set(h,'Xticklabel',x1)

Plot with symbolic value on x axis

Use numeric values to plot Use symbolic values to make labels h = plot(x,y) syms T x1 = x*T; set(h,'Xticklabel',x1)

2 days ago | 0

Answered

alignment between thermal and color images

I usually use this simple scheme I1 = im2bw(RGB); I2 = im2bw(THERMAL); imshow(cat(3,I1*255,I2*255,I1*0))

alignment between thermal and color images

I usually use this simple scheme I1 = im2bw(RGB); I2 = im2bw(THERMAL); imshow(cat(3,I1*255,I2*255,I1*0))

2 days ago | 0

Answered

Selecting parts of gridded data- I Need Help. I want to know it's possible or not?

Here is my achievement clc,clear load points.mat load grid_datamat.mat p = table2array(Points); g = table2array(grid_da...

Selecting parts of gridded data- I Need Help. I want to know it's possible or not?

Here is my achievement clc,clear load points.mat load grid_datamat.mat p = table2array(Points); g = table2array(grid_da...

2 days ago | 1

| accepted

Answered

Unable to solve exercise using duffing equation

Where is blue part? You should use for loop to calculate for different gamma = 0.1:0.1:2; for i = 1:length(gamma) x1_...

Unable to solve exercise using duffing equation

Where is blue part? You should use for loop to calculate for different gamma = 0.1:0.1:2; for i = 1:length(gamma) x1_...

3 days ago | 0

| accepted

Answered

Keypress to another program

What about ButtonDownFcn? function main x = linspace(0,10,50); y = sin(x); h = plot(x,y,1,1); set(gca,'buttonDownFcn',@...

Keypress to another program

What about ButtonDownFcn? function main x = linspace(0,10,50); y = sin(x); h = plot(x,y,1,1); set(gca,'buttonDownFcn',@...

3 days ago | 0

Answered

How to vectorise or speedup the code

Try pdist2 D = pdist2([Lat(:) Lon(:)],[lat(:) lon(:)]); % create every possible combinations of distances [i,j] = find(...

How to vectorise or speedup the code

Try pdist2 D = pdist2([Lat(:) Lon(:)],[lat(:) lon(:)]); % create every possible combinations of distances [i,j] = find(...

3 days ago | 0

| accepted

Answered

Solve ODE for the eigenvalue

I changed limits and the call of bvp4c xlow = -2; xhigh = 2; X0 =8 ; y10 = 1; y20 = 1; sol = bvp4c(@bvp4ode, @bvp4bc, soli...

Solve ODE for the eigenvalue

I changed limits and the call of bvp4c xlow = -2; xhigh = 2; X0 =8 ; y10 = 1; y20 = 1; sol = bvp4c(@bvp4ode, @bvp4bc, soli...

4 days ago | 0

Answered

I need to save result of three loops in same file data if you possible for plot graphs or curves in 3D ?

example mass_ratio = 0.01:0.01:0.1; frequency_tuning = 0.85:0.1:1.15; damping_ratio = 0.01:0.01:0.2; displacement = zeros( l...

I need to save result of three loops in same file data if you possible for plot graphs or curves in 3D ?

example mass_ratio = 0.01:0.01:0.1; frequency_tuning = 0.85:0.1:1.15; damping_ratio = 0.01:0.01:0.2; displacement = zeros( l...

4 days ago | 0

Answered

Calculating area under curve with cutoff

Don't know about vectorizing. Maybe this part will be simpler and faster load v.mat v = cumsum(v); v1 = v; dv1 = v*0; for i...

Calculating area under curve with cutoff

Don't know about vectorizing. Maybe this part will be simpler and faster load v.mat v = cumsum(v); v1 = v; dv1 = v*0; for i...

4 days ago | 0

Answered

How can I plot 2 fit curves in the same plot using cftool ?

Try this in second fit

How can I plot 2 fit curves in the same plot using cftool ?

Try this in second fit

4 days ago | 0

| accepted

Answered

How in Matlab R2019b fix error in ode45 solver command in solving a dynamic system consists of multiple ODEs equations?

Mistakes Also i suggest you to re-write your equations: dxdt(1,1) = delH*N-(1-u1)*lamH*(x(6)/N)*x(1)-delH*x(1)+alfa*x(3); d...

How in Matlab R2019b fix error in ode45 solver command in solving a dynamic system consists of multiple ODEs equations?

Mistakes Also i suggest you to re-write your equations: dxdt(1,1) = delH*N-(1-u1)*lamH*(x(6)/N)*x(1)-delH*x(1)+alfa*x(3); d...

4 days ago | 0