Answered
How to create a lookup table?
Read about knnsearch. Also have a look on scatteredInterpolant.

5 years ago | 0

Answered
Get a new matrix from another matrix through loop
D_GW = zeros(2,3); D_GW(:,1) = 0; D_AQ = [2 3; 5 6]; % D_GW = [0 2 5; 0 5 11] for row = 1:size(D_AQ,1) ...

5 years ago | 0

| accepted

Answered
How can I find the number of row in which the maximum value obtained for a particular column?
Read about the function max. A = rand(10) ; % 10*10 matrix [val,idx] = max(A(:,3)) % maximum value for the oclumn 3 fp...

5 years ago | 0

| accepted

Answered
How can I extract multiple subsequences from a set of values?
Read about reshape. x=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]; m = length(x) ; n = 5 ; x = [x NaN(1,(n - r...

5 years ago | 1

| accepted

Answered
How to plot same function from different starting positions
C = 51 ; absorbed_solar_radiation = 239.4 ; A = 221.2 ; B = -1.3 ; greenhouse_effect_PI = 0 ; dt = 1 ; n_step = 200 ; ...

5 years ago | 0

| accepted

Answered
How to match two arrays
Read about ismember.

5 years ago | 1

Answered
scatter random points around polynom
x_poly = [700 750 730 630 700 745 830 765 700]; y_poly = [0 266 570 780 1150 1300 1580 1880 2400]; %Create Polynom based on u...

5 years ago | 0

Answered
Creating and executing function
https://in.mathworks.com/learn/tutorials/matlab-onramp.html

5 years ago | 2

Answered
Plot multiple b-value on an error vs frequency plot.
Something like this: clear all; close all; clc; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ...

5 years ago | 0

Answered
How to get every possible combinations of elements to approach a value and plot them together?
x = [144.2,31,138.8,56,54,27,25,24,18,17,12,4,266,240.5,215,132,75,30.3,20,19,18,18] ; n = 3 ; val = 325 ; y = nchoosek(x...

5 years ago | 0

Answered
Filter out NaNs but not lose data completely?
You can fill those NaN's using multiple ways. Read about fillmissing. You can also use interpolation methods to fill those nanas...

5 years ago | 1

| accepted

Answered
Understand part of code
axd2i=axd2(:,1); % get the first column of axd2 axd2d=axd2(:,2); % get the second column of axd2 axd2i(axd2i==0)=[]; ...

5 years ago | 1

| accepted

Answered
how to resize images
First read the documentation of imresize. Run an example given out there. Understand it and then use the functio. Get the scale ...

5 years ago | 0

| accepted

Answered
Use sorted variable to reorder rows of a matrix
idx = [42 33 27 22 17 12 7 4 2 1 0 43 34 26 21 16 11 6 3 1 0 0 44 35 28 22 17 12 7 4 2 1 0 45 36 29 23 18 13 8 2 1 0 0 46 37...

5 years ago | 0

Answered
extract decimal number from a file name
str = '2C2C' ; str = '2.5C3C' ; % str = '2.5C3.5C' ; idx = strfind(str,'C') ; num1 = str2num(str(1:idx(1)-1)) num2 = s...

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.
This problem occurs when you try to save more number of elements than it is intialized for. This line: costI(:,i)=alpha+(beta.*...

5 years ago | 0

| accepted

Answered
Plotting best fit line
Read about polyfit. If (x,y) are your data points. p = polyfit(x,y,1) ; yi = polyval(p,x) ; scatter(x,y); hold on plot(x,...

5 years ago | 1

| accepted

Answered
critical points on matlab?
L = [0.5 0.7 0.8 1.3 1.5]; T = [1.433 1.667 1.784 2.280 2.450; 1.419 1.679 1.795 2.288 2.458; 1.405 1.691 1.806 2...

5 years ago | 1

Answered
Selecting range of values
X = zeros(1,3) ; X(1) = a ; X(2) = b ; X(3) = c ; You need not to use, a loop..while initiating itself initiate it as avect...

5 years ago | 0

Answered
Can you help me to analysis the small Data?
data = importdata(file) ; % file is your filename id = ismember(data(:,1),2001:2005) ; data = data(id,:) ; % now d...

5 years ago | 0

Answered
how to solve equation and mark value on its graph?
syms Vc V t R C eqn = Vc - V * (1 - exp(-t ./ (R * C)))==0 ; s = solve(eqn,t) The above is the formula from the equation to ...

5 years ago | 0

Answered
How to plot it?
https://in.mathworks.com/matlabcentral/answers/93623-how-do-i-plot-the-line-of-intersection-between-two-surfaces

5 years ago | 0

| accepted

Answered
How can I stop a loop using the comparison between the last and the penultimate value of an array as a condition?
You can initiate them using vectors. why did you use cells? I am adding the required part for you, there is an elegant way to ha...

5 years ago | 0

| accepted

Answered
how to extract subvectors of a vector or matrix?
n=100; x=[1 2 3 4 5 6 7 8 9 10]; y=[1 4 9 16 25 36 49 64 81 100]; m = length(x) ; xx = cell(m-1,1) ; yy = cell(m-1,1) ;...

5 years ago | 0

Answered
Why isn't the graph displaying the expected results?
Vr= -60; Vm= linspace(-80.000,60.000,100); % give more numebr here vm=Vm-Vr; an=.01*(10-vm)/((exp((10-vm)/10))-1); bn=...

5 years ago | 0

Answered
Struggling to add the polynomial line
n = 10 ; x = 1:n ; y = rand(size(x)) ; p = polyfit(x,y,1) ; yi = polyval(p,x) ; figure hold on plot(x,y,'*r') plo...

5 years ago | 0

| accepted

Answered
error unrecognized variable input
That depends on your problem right? You need to have input features and the respective outputs/ targets. Then the NN gets traine...

5 years ago | 0

Answered
Taylor series determining the values and errors
You need to substitute the value of x. Read about subs, double. If T1 is your Taylor series x = 5 ; val = double(subs(T1,5))...

5 years ago | 0

Answered
Simplify the following complex expression.
There are inbuilt functions available. Read about real, imag, cart2pol, pol2cart. a = 3*e-j*pi/3+ 4*e*j*pi/6 ; b = (1+j) +j *...

5 years ago | 0

Load more