Answered
How do I perform Gaussian elimination?
https://in.mathworks.com/matlabcentral/fileexchange/48571-gauss-elimination-method https://gist.github.com/esromneb/1d57b1d16...

6 years ago | 0

| accepted

Answered
How can I check if a point (x,y) is either inside or outside a shape in a graph created be a set of experimental points
Read about inpolygon. This will help you to get whether the give point is inside or outside the given closed region.

6 years ago | 2

| accepted

Answered
Sum all possible combinations of tablecolumns
You can get all possible combinations of k columns choosen out of given n columns using nchoosek. REad about this function. You ...

6 years ago | 0

| accepted

Answered
Declared variable shown as undefined
N=4; function cost=hybrid_cost(x,N) cost=0; T1=0; q=zeros(N); q(1,1)=x(1); q(N,N)=x(2); M=create_M(x); Ai...

6 years ago | 0

Answered
How do I include the row and column values say P = [2;4] into an equation where z = 10 + 2 (where 2 is the "x" cordinate of P? Thank you
P = [2;4] ; z = 10+P(1) ; You should read about MATLAB array indexing.

6 years ago | 0

Answered
Concentric Squares with random points
clc; clear all ; % Inner Square S1 = [-5 -5 ; 5 -5 ; 5 5 ; -5 5] ; % Outer Square S2 = [-10 -10 ; 10 -10 ; 10 10 ; -10 10]...

6 years ago | 1

| accepted

Answered
Using finite differences to find the displacement (x,y) of a projectile including the effect of drag
There was a type error in updating XxN.....it was typed as xxN instead of XxN.....find the below corrected code: close all clc...

6 years ago | 0

Answered
Stress strain average unique sample points
If (x,y) are your data points. Use the following to avoid the error. [x,idx] = unique(x) ; y = y(idx) ; yi = interp1(x,y,x...

6 years ago | 0

| accepted

Answered
Contourf is plotting weird lines. How to remove them?
Use pcolor with shading interp instead of contourf.

6 years ago | 1

Answered
Indexing problem based on value?
B = A(1:6) You should read about array indexing in MATLAB. MATLAB indices are always nonzero positive integers. When you use ...

6 years ago | 0

| accepted

Answered
Why does probabililty distribution for 3D matrix not work with NaN values?
You can skip the computation using isnan. It gives you 1 as out put if number is nan and 0 if number is not a nan. Read about is...

6 years ago | 0

Answered
Draw a line between two points on plotted data and compute its length
px = [1, 2, 5]; py = [1, 2, 1.5]; x = [px(1) py(1)] ; y = [px(2) py(2)] ; z = [px(3) py(3)] ; plot3(x,y,z,'r') d =...

6 years ago | 1

| accepted

Answered
Function Code ( Matlab )
x=9 ; a=1; b=3 ; c=5 ; F = (log(a*x^2+b*x+c)-sin(a*x^2+b*x+c))/(4*pi*x^2+cos(x-2)*(a*x^2+b*x+c)) You must read about MATLA...

6 years ago | 0

| accepted

Answered
Heatmap of 2D plot
t=[1/512:1/512:5]'; z = zeros(size(t)); col = amp; % This is the color, vary with amp in this case. surface([t t],[amp amp],...

6 years ago | 0

Answered
How to export the result of for loop to the excel file
A = pareto_frontier(:,2:3) ; xlswrite('test.xlsx',A) Also have a look on write2table.

6 years ago | 0

| accepted

Answered
How can I find only points in sector range ?
Read about inpolygon.

6 years ago | 0

Answered
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.
You want this. S = load("data.mat") ; data = S.Fe2MnGe_new ; v = data(:,1) ; ca = data(:,2) ; z = data(:,3) ; nx = ...

6 years ago | 0

| accepted

Answered
Compare and remove duplicates with min value of another column
num = xlsread("sample.xlsx") ; C1 = num(:,1) ; C4 = num(:,end) ; [c,ia,ib] = unique(C1) ; N = length(c) ; iwant = zero...

6 years ago | 0

Answered
How to find specific value in a table
You canget the index where it lies using strfind. Let T be your table. idx = strfind(T.Formula,'H2O') ; % logical index i...

6 years ago | 1

| accepted

Answered
Can I name data in the scatter graph?
This can be very much done......read about text. With this you can place text where ever you want by providing location. Read ...

6 years ago | 0

| accepted

Answered
Finding Largest Factor Using While Loop
n = 15 ; largestfactor=floor(n/2); while largestfactor>0 if mod(n,largestfactor)==0 break end largest...

6 years ago | 1

| accepted

Answered
How can I remove the line in 3D plot
clc; clear all ; slow = [21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 22 22 22 22 22 ...

6 years ago | 0

| accepted

Answered
How to store an image from imshow?
Read about imwrite.

6 years ago | 0

| accepted

Answered
Extracting information from images of different size
The following links shall be useful: https://in.mathworks.com/help/vision/examples/recognize-text-using-optical-character-reco...

6 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.
fid = fopen ('Matrix_A.txt','r'); i = 1; A = cell([],1) ; while ~feof(fid) A{i} = str2num(fgets(fid)); i = i + 1; e...

6 years ago | 0

| accepted

Answered
How to graph multiple points onto one graph?
data = [0,3.8*10^8 1,4.2*10^7 2,1.5*10^7 3,7.8*10^7 4,4.7*10^6 5,3.16*10^6 6,2.3*10^6 7,1.7*10^6 8,1.3*10^6 9,1.05*10^6...

6 years ago | 0

Answered
Variable x must be of size [2 1]. It is currently of size [2 2]. Check where the variable is assigned a value.
A = [1 2 4 5 7 ; 9 2 1 4 13] ; B = [-11 2 ; 3 -1 ; 2 0; 5 11 ; -21 1]; C = A*B ; D = B*A ; s = det(C) ; t = det(D) ; x...

6 years ago | 1

| accepted

Answered
How do I make the following a function?
[M,VSD] = myfunction(A) ; % Christopher Clarke % 10/05/2020 % This function calculates the mean and standard dev...

6 years ago | 0

Answered
Why calculation with using matrix is different from manual calculation?
YOu have missed . in some places, check the below corrected line: Re=10^5:10^5:10^6; C_D = 24./Re + (2.6*(Re/5))./(1+(Re/5.0)....

6 years ago | 0

| accepted

Load more