Community Profile

darova

Last seen: Today
645 total contributions since 2019

View details...

Contributions in
View by

How to add a trendline to a histogram plot and not show the histogram?
Here is my solution x = randi(100,1,100); hist(x,20); [y,x0] = hist(x,20); hold on plot(x0,y) hold off

11 hours ago | 0

How to plot from a line array?
Here is an example clc,clear % create some data with handles h(1) = plot([0 1],[0 1],'r'); hold on h(2) = plot([1 3],...

13 hours ago | 0

Contour plot: how to plot matrix Z as the y-axis and array Y as the levels
I have generated a matrix Z of data, by looping arrays X and Y in nested for-loops Use meshgrid to create X and Y as matrices ...

15 hours ago | 0

Pore size distribution chart
Use regionprops I = imread('image.jpeg'); I1 = im2bw(I); % binarize image cc = bwconncomp(I1); ...

19 hours ago | 0

| accepted

How to visualize al the values inside the array and make split them into two sections?
Just use logical indexing ix = val > 2; scatter3(x(ix),y(ix),z(ix),10,'r') hold on scatter3(x(~ix),y(~ix),z(~ix),10,'r') ho...

1 day ago | 0

Plot all four functions

1 day ago | 0

How to attempt the first stage of this task?
I give you a start: This is cosine wave (one cycle) I usually use linspace to form array with number of points i want x = l...

1 day ago | 0

How to plot a single column of values with a linear regression line through it
Here is a simple example (i made it special for you) N = 20; x = linspace(0,3,N); y = 2*x + rand(1,N); p = polyfit(x,y,1); ...

1 day ago | 0

Fill area between contour levels
Here is an idea: plot all your contours fill external contour you want [~,h1] = contourf(X,Y,Z,[1 1],'edgecolor','none');...

2 days ago | 1

analytic solution with infinite sum
Here is my attempt Ti = 150; T1 = 300; T2 = 200; L = 1; alpha = 0.1; delta_x = 0.05; delta_t = 0.01; N_time = 51; N_spa...

2 days ago | 0

Two curves in one plot with wrong scaling
Use function that fit() returns [fitresult, gof] = fit( xData, yData, ft, opts ); % plot(fitresult,'r') plot(xData,fitresult(...

2 days ago | 0

My Excel writing program does not stop
It this a success? V1 = randi(100,5,5); for i = 1:size(V1,1) vv1 = { num2str(V1(i,:)) }; xlswrite('data.xls',vv1,'sh...

3 days ago | 0

Hi All,Remove empty [] entries row in Timetable, rmmissing is not removing rows which have empty entries, Please help, thank you very much

3 days ago | 0

| accepted

How to differentiate a series of functions denoted by varying a parameter i=1,2 in (h_i)?
Mistake that h_1 and h_i and different variables m1stake = 2; m2stake = 3; for i = 1:2 disp(mistake) % doesn't...

3 days ago | 1

| accepted

Solving FitzHugh-Nagumo equations using ODE45
Here is my achievement. I don't get about stim. Can you explain more? % du/dt = c1u ( u − a)(1 − u) − c2uv +stim ...

3 days ago | 0

Convert a vector to single element
Use cells signal = cell(254,1); for i = 1:255-1 signal{i} = dec2bin(i,8); end

4 days ago | 0

Plotting an array of vectors
Try following h = get(gca); % h = get(gca,'children'); % or try this y = get(h(1),'ydata'); set(h(1),'ydata',y+50)

4 days ago | 0

How could I code for loop with this values?
This script should give you success you are looking for A = [40, 60, 30, 80, 70, 50, 90, 30]; B = A(1); for i = 2:length(A) ...

4 days ago | 2

| accepted

How to keep column of removed row in matrix
It was harder that i thought clc,clear % create some data A = zeros(10); ix = randi(100,1,10); % random ...

4 days ago | 0

| accepted

Changing equation with loop
Use this Me = sqrt(2./(gamma-1).*((nPratio.^((gamma-1)./gamma))-1)); ind = Me < 1; x = (P0.*sqrt(gamma/R).*Me.*(1+((gamma-1)/...

4 days ago | 0

Need help finding the cartesian coordinates of a projectile in flight.
Here is what i invented clc,clear x1 = 671.4971; y1 = 717.2387; z1 = 0; az1 = 75.1148*pi/180; el1 = 9.3679*pi/180; [u1,...

4 days ago | 0

Cubic smooth spline plot in 3d for several layers
Maybe you don't need interpolation. I just removed NaN numbers D = importdata('Data.txt'); A = D.data; x = A(:,1); cla ho...

4 days ago | 0

Interpolate Points of a 3D Point Cloud?
Use griddata to create surface Use contour3 to create crossection clc,clear load data.txt x = data(:,1); y = data(:,2); z ...

4 days ago | 0

| accepted

Why is my scatter plot producing inconsistent results?
I made some changes to your code. Look points = [pd17 ev17 mat17 cai17 mar17 jen17 bla17 sch17 jam17 nad17 pd18 ev18 c...

4 days ago | 0

| accepted

How to show only elliptic region in color?
try this [X,Y] = meshgrid( -10:0.2:10 ); Z = X.^2 + Y.^2; ind = X.^2/5^2 + Y.^2/3^2 < 1; Z(~ind) = nan; pcolor(X,Y,Z)

5 days ago | 0

| accepted

How to shade area under 2D- curve into a certain x values
Maybe something is wrong with importing? Try importdata Data = importdata('cl024_12._lab.txt'); L = Data.data(:,5); Depth = D...

5 days ago | 0

| accepted

How to plot the 3D spherical histogram?
You can create it manually clc,clear v = rand(10,3)*2-1; v0 = v(:,1)*0; quiver3(v0,v0,v0,v(:,1),v(:,2),v(:,3),1) axis equ...

5 days ago | 0

Intersection of two helical surfaces
Try filexchange surface_intersection

5 days ago | 0

Rotate 3D surface matrices
You can manually change data. Just use rotation matrix a = 15; % angle rotation R = [cosd(a) sind(a);-sind(a) cosd(a)]; V...

5 days ago | 0

| accepted