Answered
how can i solve this error?
x=1:0.1:6; for i=1:length(x) h(i)=z2+(x(i)-ls)*z4; end

6 years ago | 1

Answered
Creating 2D contours from XYZ values
Read about delaunayTriangulation. And then use this https://in.mathworks.com/matlabcentral/fileexchange/38858-contour-plot-for-s...

6 years ago | 0

Answered
Can anyone help me salve the error "Not enough input aruments in line 15
EDT = your value ; RMS = your value ; posteriror = your value ; printit = you value ; [stnin stnout] = estimLocRMS(EDT, RM...

6 years ago | 0

| accepted

Answered
Can somebody help me with plate element in tension analysis in MATLAB?
This is a subject specifc question. You must learn FEA first and then code in MATLAB. Refer this book which teaches FEA with MAT...

6 years ago | 0

| accepted

Answered
Taking number out from the image name.
[d,name,ext] = fileparts(fn) ; a = str2num(name) ;

6 years ago | 0

| accepted

Answered
conversion of pixels into string
Read about num2str.

6 years ago | 0

Answered
how to set limit of scatter plot
Reead about xlim, legend, text, axistight.

6 years ago | 0

| accepted

Answered
Calling multiple variables in one line of output
n1 = rand; n2 = rand ; fprintf("President Jones, for your %d, Kiloton blast at %d miles\n",n1,n2)

6 years ago | 0

| accepted

Answered
stopping the loop and save in a cell array
Follow somehting likethis: a = [1 3 4 2 3 4 5 6 3 4 5 6 8 9 10 9 8 7 6 7 8 9 8 7 5 4 3 2 4 5 3 1 2 4 4 3 2 4 6 5 4 6 7 9 9 10 ...

6 years ago | 0

Answered
how to get the division number
Read about linspace, mod. It is a basic mathematics that if mod(x,n) = 0, then x is divisible by n. n = 7 ; x = 1:15 ; x(mo...

6 years ago | 0

Answered
Averaging Matrix and store it in a new matrix
A = rand(10) ; [m,n] = size(A) ; [X,Y] = meshgrid(linspace(0.5,(m-0.5),m),linspace(0.5,(n-0.5),n)) ; t = A(:) ; pcolor...

6 years ago | 0

| accepted

Answered
north east center cartesian coordinate to spherical coordinate
Read about cart2pol, cart2sph.

6 years ago | 0

Answered
How to delete the first or the first two characters in a string?
string(1:2) = [] % To remove the firt two elements

6 years ago | 0

| accepted

Answered
Add strings with a loop
Name =cell(numRows) ; for j=1:numRows; Name{j}=Test.Measure(j, 1).name end iwant = unique(Name)

6 years ago | 0

| accepted

Answered
How do I concatenate multiple vectors at random order?
Use them as cells and make the indices random. a{1} = 1:10 ; a{2} = 2:12 ; a{3} = 3:13 ; idx = randperm(3) ; iwant = cel...

6 years ago | 1

| accepted

Answered
Generating a 1D random walk
N = 1000 ; W = [-1 1] ; RW = zeros(N,1) ; RW(1) = W(randperm(2,1)) ; for i = 2:N RW(i) = RW(i-1)+W(randperm(2,1)) ; ...

6 years ago | 0

| accepted

Answered
Plotting multiple graphs but only a graph is shown
You must remove hold off in the for loop.

6 years ago | 0

| accepted

Answered
Find Intersection coordinates of Contour and line plot
You can use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=function

6 years ago | 0

Answered
How to use plot3 and a for loop to gradually plot the 3D graph of values?
figure hold on for i=1:20 plot3(X(i),Y(i),Z(i),'.r') end You have to use a marker when you are plotting a single point....

6 years ago | 0

| accepted

Answered
Grouping matrix data into variables when they have the same value in the first column
Let A, B be your first and second column. [C,ia,ib] = unique(A) ; N = length(C) ; iwant = cell(N,1) ; for i = 1:N iw...

6 years ago | 0

| accepted

Answered
How to deal with Nan values while doing regression in Matlab?
Either remove the NaN values or fill them using fillmissing.

6 years ago | 0

Answered
How to find the coordinates of points on the boundary of the polygon using MATLAB?
YOu can select a random point on a line as below: P = rand(2,2) ; % points of a line p = polyfit(P(:,1),P(:,2),1) ; % fit a...

6 years ago | 0

| accepted

Answered
Grid Resolution Changing by Bilinear Interpolation
Let A be your 1X721X1440 data. And X, Y be your respect matrices with resolution 0.25. A = squeeze(A) ; xi = min(X(:)):1:max...

6 years ago | 0

Answered
How to determine if points fall above an arbitrary line?
Read about inpolygon. numXY = randi([1, 19], 1); lineXs = [0; sort(rand(numXY, 1) * numXY)]; lineYs = rand(size(lineXs)); ...

6 years ago | 0

| accepted

Answered
How do I plot YY from the excel file data?
data = xlsread("Sample Excel Data.xlsx") ; A = data(:,[1 3 5]) ; % pick 1, 3 , 5 column K = A(1,:) ; % factors A(1,:) = ...

6 years ago | 0

| accepted

Answered
Help with If else statement
y = zeros(size(x)) ; y(x<5) = 50-0.5*x(x<5) ; y(x>=5) = 50+0.5*x(x>=5) ;

6 years ago | 0

| accepted

Answered
whats the diffrence in max methods ?
a(g)=max(p(i,g)); The above gives maximum in array p(i,g). If p(i,g) is a scalar, the same value you will get. a(g)=max(p(:,...

6 years ago | 0

| accepted

Answered
Averaging Values in a Matrix with Nans
Strain=[-1,0,2,-1,-1,-1,-1;-1,1,1,1,nan,-1,-1;-1,2,2,1,-2,-2,-1;0,2,1,-1,-1,0,0;-1,1,3,-1,-2,0,-2;0,0,1,2,-1,0,-1;1,1,0,1,-1,1,-...

6 years ago | 0

| accepted

Answered
plot subset of data
Let x,y be your values. Where x = 1:1000 and y lies in [0, 2*pi] ; idx = y>4 ; % get indices of y which are greater than four...

6 years ago | 0

| accepted

Answered
Posting a new function
You can post it in matla fileexchange. https://in.mathworks.com/matlabcentral/fileexchange/

6 years ago | 0

Load more