Answered
how can i find the co-ordinates of intersections of two lines?
This function can be used for what you want: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

5 years ago | 0

Answered
connecting 2 curves in 3 space by vertical lines at nth points
Let P1, P2 be your two data points. I assume them to be column arrays and both of them have same rows. [m,n] = size(P1) ; N ...

5 years ago | 0

Answered
Problem on storing data in new table using for loop
NewTable=zeros(10,100); for k=1:nrow if tarray(k,2)==1 for m=1:ncol % <---- start from m = 1 for n=1:nrow ...

5 years ago | 0

Answered
how to check time in if statement?
Read about tic toc.

5 years ago | 0

Answered
plotting eta v/s iteration
N = 15 ; beta_a = 10; alpha_n = 10 ; eta = zeros(1,N) ; eta(1)=15; for i=1:N-1 theta_i = asind(sind(beta_a)*si...

5 years ago | 0

| accepted

Answered
Help me pls I'm Hurry
One example: k = char(32+16*triu(ones(3))) ; l = char(32+16*diag(ones(3))) ; m = flipud(char(32+16*tril(ones(3)))) ; A...

5 years ago | 0

| accepted

Answered
Determine how many times their graphs intersect.
DEfine the values of x. Read about linspace. Now you can make your required functions. You need to use element by element oper...

5 years ago | 0

Answered
How to write a function with 3 inputs and a calculated if statement?
If a, b is your original and approximate values, tol is tolerance. You have to use: if abs(a-b)<=tol Next, read about how to ...

5 years ago | 0

Answered
Add specific numbers to a plot
Read about the function text.

5 years ago | 0

| accepted

Answered
Plotting 2D graph error: Index exceeds
Error is simple.....the variables Ro2, Rn2 are scalars i.e. they are constants and they have sinlge value. In the line: C(i) =...

5 years ago | 0

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side-what does it mean?
Demo: A = zeros(3,4) ; % initialization % fill the values for i = 1:3 A(i,:) = [rand rand rand rand] ; % only four va...

5 years ago | 0

Answered
How to solve a single nonlinear equation with parameter variations?
It is suggested not to use global. Replace these lines: w=0:0.1:5; for k= 1:length(w) sol = fzero(@(A) reso(A,w(k)),A0); ...

5 years ago | 0

Answered
How to plot isoline described by an equation
Read about linspace. With this create x, y values i.e. . Make x, y matrices by using meshgrid. Substiture these values in the...

5 years ago | 1

| accepted

Answered
3d surface plot by having 3 uncorrelated vectors
Let (x,y,z) be your three column arrays. dt = delaunayTriangulation(x,y) ; tri = dt.ConnectivityList ; figure trisurf(tri,x...

5 years ago | 1

Answered
Plotting multiple input CSV on 3D graph
You need to proceed something like below: csvFiles = dir('*.csv') ; % get all csv files N = length(csvFiles) ; m = 100 ; ...

5 years ago | 1

| accepted

Answered
Is there a function in MATLAB to split the dataset into 70% for training and 30% for validation ?
https://in.mathworks.com/matlabcentral/answers/395136-how-to-divide-a-data-set-randomly-into-training-and-testing-data-set htt...

5 years ago | 1

| accepted

Answered
Add array to NetCDF file as variable
Check the demo: % nc filename to be written file = 'myfile.nc' ; delete(file) ; %% Write lon and lat variables % Get data ...

5 years ago | 0

Answered
Plotting only one data point
It looks like you are running a loop. Follow like shown below: N = 100; % loop count Er = zeros(1,N) ; for i = 1:N ...

5 years ago | 0

Answered
How to add hours:minutes in Matlab?
t='10:10'; [Y, M, D, H, MN, S] = datevec(t); H*60+MN

5 years ago | 0

Answered
Array indices must be positive integers or logical values.
In MATLAB arrays indices cannot be negative/ zeros. Your code: for t = [0:1:10] v(t) = pwmmode (t,T,d); end Should be li...

5 years ago | 0

Answered
Fitting a parametric function to a dataset
Have a look on this: https://in.mathworks.com/matlabcentral/fileexchange/33610-a-tour-of-parametric-equations

5 years ago | 0

Answered
How to zero the data points behind the line of figure?
data = ones(100,200); x = (0:1:size(data,2)-1)*0.1; y =(0:1:size(data,1)-1)*0.1; x1 = [2.4;13.9]; y1 = [-0.5;9.8]; p = ...

5 years ago | 0

| accepted

Answered
How can I merge my data set based on the time in MATLAB?
data_1_y_axes=[0,1,3,5,4,6,8,9,7] ; time_1_x_axes=[.02,0.03,.05,.06,.07,0.08,0.09,.1,.2] ; data_2_y_axes=[0,2,4,5,2,7,5,7,5] ;...

5 years ago | 0

Answered
transpose loop without operator
A = rand(3) ; [m,n] = size(A) ; B = A ; for i = 1:m for j = 1:n B(i,j) = A(j,i) ; end end

5 years ago | 1

Answered
how can ı solve without curve fitting?
Read about polyfit. x=0:5; y=[15, 10, 9, 6, 2, 0]; p = polyfit(x,y,4) ; xi = 0:0.1:5 ; plot(x,y,'or',xi,polyval(p,x...

5 years ago | 1

| accepted

Answered
Please, how to plot for this code?
Read about element by element operations. k = -2:0.1:2; g = ((2*cos(2*k))-2)./(1i*k); % use ./ plot(k,abs(g)) hold on pl...

5 years ago | 0

| accepted

Answered
Randomly concatenating audio files
N = 10 ; C = cell(N,1) ; % C(2:2:end) = insert your silence audio idx = 1:2:N ; % left indices to insert your required ...

5 years ago | 0

| accepted

Answered
How can I plot a circle use given point?
If you have points.....you can find the radius of circle. It depends on how many points you know. Frame the distance formula a...

5 years ago | 0

Answered
For Loop range error
t0 = -0.5 ; % initial time t1 = 50 ; % final time dt = 0.5 ; % time step T = t0:dt:t1 ; % create time vector N = le...

5 years ago | 0

Load more