Answered

How to find the y from given x on fit line?

Yes very much it is possible. Read about interp1. Also have a look on polyfit and polyval.

How to find the y from given x on fit line?

Yes very much it is possible. Read about interp1. Also have a look on polyfit and polyval.

23 dagar ago | 0

Answered

Area plot matlab colors

figure hold on area(array1,'EdgeColor','none','FaceColor','r'); area(array2,'EdgeColor','none','FaceColor','b'); area(arra...

Area plot matlab colors

figure hold on area(array1,'EdgeColor','none','FaceColor','r'); area(array2,'EdgeColor','none','FaceColor','b'); area(arra...

23 dagar ago | 0

Answered

For loop get an error of "size of the right side is 0-by-1"

peak = B for i = 1:length(B) c = A(B(i,1):C(1,1)) ; if ~isempty(c) peak(i,1) = max(c); end end

For loop get an error of "size of the right side is 0-by-1"

peak = B for i = 1:length(B) c = A(B(i,1):C(1,1)) ; if ~isempty(c) peak(i,1) = max(c); end end

24 dagar ago | 0

| accepted

Answered

I have 2 sets of noisy data when plotted against each other forms a parallelogram . I want to simplify this to a simple parallelogram with 4 vertices and find the area within.

smooth the data and use polyarea.

I have 2 sets of noisy data when plotted against each other forms a parallelogram . I want to simplify this to a simple parallelogram with 4 vertices and find the area within.

smooth the data and use polyarea.

25 dagar ago | 0

Answered

I want to plot selected data from rows and columns

T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1186758/SN_m_tot_V2.0.txt') ; scatter3(T.(1),T.(2)...

I want to plot selected data from rows and columns

T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1186758/SN_m_tot_V2.0.txt') ; scatter3(T.(1),T.(2)...

26 dagar ago | 0

Answered

how to import data from csv and plot?

T=readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1186578/baseline.csv'); X=T.(1); Y=T.(2); plot(Y)

how to import data from csv and plot?

T=readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1186578/baseline.csv'); X=T.(1); Y=T.(2); plot(Y)

27 dagar ago | 1

Answered

I am trying to open multiple folders which have about 500 files under them and then use function vtkread to read the files in those folders. I am not sure how to set that up.

thepath = ' '; % give your path thedirs = dir(thepath) ; thedirs(1:2) = [] ; % remove . and .. Z = cell([],1) ; % initaal...

I am trying to open multiple folders which have about 500 files under them and then use function vtkread to read the files in those folders. I am not sure how to set that up.

thepath = ' '; % give your path thedirs = dir(thepath) ; thedirs(1:2) = [] ; % remove . and .. Z = cell([],1) ; % initaal...

27 dagar ago | 0

| accepted

Answered

How can i plot the projection of 3d on 2d?

X=1:1:100; Y=1:1:100; Z=1:1:100; figure hold on scatter3(X,Y,Z,[],Z,'filled') scatter(X,Y,[],Z,'filled') view(3)

How can i plot the projection of 3d on 2d?

X=1:1:100; Y=1:1:100; Z=1:1:100; figure hold on scatter3(X,Y,Z,[],Z,'filled') scatter(X,Y,[],Z,'filled') view(3)

27 dagar ago | 0

Answered

How do I replace -1.0000e+30 with NaN?

Let T be your array. tol = -10^10 ; % fix this to satisfied value T(T<tol) = NaN ;

How do I replace -1.0000e+30 with NaN?

Let T be your array. tol = -10^10 ; % fix this to satisfied value T(T<tol) = NaN ;

27 dagar ago | 0

| accepted

Answered

Replacing part of an array with another

A = rand(4) ; B = rand(4) ; n = size(A,1); A(1:(n+1):end) = diag(B) ; % repalce diagonal elements of A with diagonal elemen...

Replacing part of an array with another

A = rand(4) ; B = rand(4) ; n = size(A,1); A(1:(n+1):end) = diag(B) ; % repalce diagonal elements of A with diagonal elemen...

27 dagar ago | 1

| accepted

Answered

Getting following error while making Contourf plot [ Error using contourf Z must be at least a 2x2 matrix]

T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1185378/Book1.xlsx') ; x = T.(1) ; y = T.(2) ; z...

Getting following error while making Contourf plot [ Error using contourf Z must be at least a 2x2 matrix]

T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1185378/Book1.xlsx') ; x = T.(1) ; y = T.(2) ; z...

27 dagar ago | 0

| accepted

Answered

Plotting simple functions bounded by inequalities

m=-0.08; j=linspace(min(Ts_),max(Ts_),100); alpha_variable = m*j ; alpha_variable(j<-10) = 0.7 ; alpha_variable(j>10) = 0....

Plotting simple functions bounded by inequalities

m=-0.08; j=linspace(min(Ts_),max(Ts_),100); alpha_variable = m*j ; alpha_variable(j<-10) = 0.7 ; alpha_variable(j>10) = 0....

28 dagar ago | 0

Answered

Plotting complementary error function with 2 variables

T0 = 100; T1 = 70; c = 1; x = linspace(-1,1) ; % define your range t = linspace(0,10) ; % define your range [x,t] = m...

Plotting complementary error function with 2 variables

T0 = 100; T1 = 70; c = 1; x = linspace(-1,1) ; % define your range t = linspace(0,10) ; % define your range [x,t] = m...

29 dagar ago | 0

Answered

Somebody help me for my exercise please.

This is how you have to proceed. U=200; %velocity gamma=1000; %circulation Q=14; ...

Somebody help me for my exercise please.

This is how you have to proceed. U=200; %velocity gamma=1000; %circulation Q=14; ...

29 dagar ago | 0

| accepted

Answered

Finding the gradient and the hessian of the same function

Read about gradient, hessian.

Finding the gradient and the hessian of the same function

Read about gradient, hessian.

29 dagar ago | 0

| accepted

Answered

How can I get the 3 minimum values of this plot?

REad about min. You have saved rmse of train, validatioon and testing. Use the function min and get the index. I would say check...

How can I get the 3 minimum values of this plot?

REad about min. You have saved rmse of train, validatioon and testing. Use the function min and get the index. I would say check...

29 dagar ago | 0

| accepted

Answered

DIFFERENCE BETWEEN SIGNALS AND PARAMETERS

Signals would be t vs amplitude plots. Parameters are charactersitics of signals such as amplitude, frequency, phase etc.

DIFFERENCE BETWEEN SIGNALS AND PARAMETERS

Signals would be t vs amplitude plots. Parameters are charactersitics of signals such as amplitude, frequency, phase etc.

29 dagar ago | 0

| accepted

Answered

a 3d plot but in a specific range

You pick your x,y to the given range. x = linspace(0,1) ; y = linspace(2,3) ; [X,Y] = meshgrid(x,y); psi_19 = (2*X) + Y ...

a 3d plot but in a specific range

You pick your x,y to the given range. x = linspace(0,1) ; y = linspace(2,3) ; [X,Y] = meshgrid(x,y); psi_19 = (2*X) + Y ...

29 dagar ago | 0

| accepted

Answered

Image processing code debugging

This line: P = regionprops(Iin, 'Perimeter'); Check the class of P class(P) It seems it is a structure and you can use it in...

Image processing code debugging

This line: P = regionprops(Iin, 'Perimeter'); Check the class of P class(P) It seems it is a structure and you can use it in...

29 dagar ago | 0

| accepted

Answered

How to use interpolation?

Let lon,lat,U be your 2D data, and x,y,u be your buoy data. Ui = interp2(lon,lat,U,x,y) ; If your data is #d (I hope it is),...

How to use interpolation?

Let lon,lat,U be your 2D data, and x,y,u be your buoy data. Ui = interp2(lon,lat,U,x,y) ; If your data is #d (I hope it is),...

29 dagar ago | 0

Answered

How to replace the zero with NaN in the specific column of cell arrays?

Let A be your m*3 array. A(A(:,2)==0,2)=NaN ; % repalce second column with NaN's A(A(:,3)==0,3)=NaN ; % replace third column ...

How to replace the zero with NaN in the specific column of cell arrays?

Let A be your m*3 array. A(A(:,2)==0,2)=NaN ; % repalce second column with NaN's A(A(:,3)==0,3)=NaN ; % replace third column ...

ungefär en månad ago | 1

Answered

Find x and y cordinates and t for z=0

Let x,y,z,t be yout required arrays. GEt the index of z where it is z = 0. Using this index, you can get what you want. tol = ...

Find x and y cordinates and t for z=0

Let x,y,z,t be yout required arrays. GEt the index of z where it is z = 0. Using this index, you can get what you want. tol = ...

ungefär en månad ago | 0

Answered

how do i plot this?

x=linspace(-2,6) ; f=(2*x./x.^2+1)-(x./sqrt(3*x+6)); %<--- element by element division plot(x,f)

how do i plot this?

x=linspace(-2,6) ; f=(2*x./x.^2+1)-(x./sqrt(3*x+6)); %<--- element by element division plot(x,f)

ungefär en månad ago | 1

Answered

How to crop the image within certain limits?

Read about imfreehand, Freehand. If you know thoese certain values. Use contour to get the closed region of the required region...

How to crop the image within certain limits?

Read about imfreehand, Freehand. If you know thoese certain values. Use contour to get the closed region of the required region...

ungefär en månad ago | 1

Answered

Inverse of a matrix in MATLAB and Python

You are to trying to fid the inverse of a singular matrix. A singular matrix is the one which doesn't have inverse. So different...

Inverse of a matrix in MATLAB and Python

You are to trying to fid the inverse of a singular matrix. A singular matrix is the one which doesn't have inverse. So different...

ungefär en månad ago | 1

Answered

How to write code for moments matrix?

https://in.mathworks.com/matlabcentral/answers/71678-how-to-write-matlab-code-for-moments https://in.mathworks.com/help/stats/...

How to write code for moments matrix?

https://in.mathworks.com/matlabcentral/answers/71678-how-to-write-matlab-code-for-moments https://in.mathworks.com/help/stats/...

ungefär en månad ago | 1

Answered

Same code in a loop but different plots

area also supports linestyle, none. load('sample.mat') thr = [0.0057 0.0401 0.0090 0.0216]; t = (0:length(sample)-1)/2000;...

Same code in a loop but different plots

area also supports linestyle, none. load('sample.mat') thr = [0.0057 0.0401 0.0090 0.0216]; t = (0:length(sample)-1)/2000;...

ungefär en månad ago | 1

Answered

Extracting text from a video

v = VideoReader('Large_Patron_Trim\Large_Patron_Trim.mp4'); N = v.NumFrames ; % Total number of rames ROI = [1008 215 50 3...

Extracting text from a video

v = VideoReader('Large_Patron_Trim\Large_Patron_Trim.mp4'); N = v.NumFrames ; % Total number of rames ROI = [1008 215 50 3...

ungefär en månad ago | 1

Answered

BAR GRAPH plot - grouped legend

Refer this: https://in.mathworks.com/matlabcentral/answers/1670649-bar-plot-with-a-hatched-fill-pattern?s_tid=srchtitle https...

BAR GRAPH plot - grouped legend

Refer this: https://in.mathworks.com/matlabcentral/answers/1670649-bar-plot-with-a-hatched-fill-pattern?s_tid=srchtitle https...

ungefär en månad ago | 1