Answered
Help with MATLAB not checking/saving the conditions of an if statement within a for loop
TRY: if a1(i) < tol && (2-tol) < a2(i) && a2(i) < (2+tol) didn't go through the whole code

8 years ago | 0

| accepted

Answered
Creating a vector using if and for statement
b(i)=a(i); %should be b(i) instead of b prevents overwriting %edit a=[2; 8; 3; 30; 4; 50; 100; 200; 4; 80; 50...

8 years ago | 0

| accepted

Answered
How to read a special column from a file?
fid = fopen('FAR.txt') f= textscan(fid,'%s ' , 'delimiter','\n') fclose(fid) c=f{1,1}(10:16) c=str2num(cell2ma...

8 years ago | 0

Answered
xy have different length how to use the interp1 since it always say error need to be in same length
vi = linspace(x(1),(x(end),numel(x)) %assuming the values don't contain nan and inf values vq = interp1(x(1:numel(v)),v,vi) ...

8 years ago | 0

Answered
I have 600 xlsx files and I want to convert all of them in mat, how to do that ?
see <https://in.mathworks.com/matlabcentral/answers/424007-how-can-i-analyze-all-the-data-files-at-the-same-time#answer_341425 *...

8 years ago | 0

| accepted

Answered
mu law compressor function
T = 10*(1/50); Fs = 10000; dt = 1/Fs; t = 0:dt:T-dt; x4 = sawtooth(2*pi*50*t); u=255 Xc = (log(1 + 255.*abs(x4)...

8 years ago | 0

| accepted

Answered
find dublicated value in a column and return the whole row
A = [ 1 ; 3 ; 5 ; 6 ; 9 ] B = [ 1 4 ; 2 7 ; 3 5 ; 9 10 ] idx=ismember(B(:,1),A) C = B(idx,:)

8 years ago | 0

| accepted

Answered
how to find values of y?
clear all syms a b c x=[0.1 1 20 30 430] %corresponding values of y y=[1510.75 a b c 10.9] for i =1:num...

8 years ago | 1

Answered
Using solve to find solution of system of equations
syms t angle_rad eq1 = df == vi*cos(angle_rad)*t-(0.5*(drag_coefficient*area_arrow*(density_air*vi^2)/2)*t^2); eq2 = hf ...

8 years ago | 0

| accepted

Answered
Read .asc of eyemovement
'/t' as delimiter

8 years ago | 0

| accepted

Answered
How to use an Excel template for exporting data using Web Application?
xlswrite('myexcel.xls',datas) Or writetable('myexcel.xls',datas)

8 years ago | 0

| accepted

Answered
How can I split an image frame into 10x10 patch size?
See *<https://stackoverflow.com/questions/34072783/matlab-split-image-to-10x10-cells>* similar case

8 years ago | 0

| accepted

Answered
fitting a linear model with constraints
See <https://www.mathworks.com/help/optim/ug/lsqlin.html *lsqlin*>

8 years ago | 0

Answered
Will Samsung galaxy S9 be comapatible with the android support package for simulink?
Yes it is compatible see <https://www.mathworks.com/help/supportpkg/android/ref/androidlib.html?s_tid=doc_ta> it was introduced ...

8 years ago | 0

Answered
How can I get integral of following function? Matlab is not showing result?
Matlabs symbolic engine is not able to solve the integral because the question contains many symbolic variables.

8 years ago | 1

| accepted

Answered
Why there is the error that "insufficient number of inputs"?
Try : integral2(@Tuu,0,pi/2,0,pi/4) % calling if the function function U=Tuu(x,y) d=2e-9; mu=8; ...

8 years ago | 1

| accepted

Answered
How to see script and command window side by side?
Just drag the command window to the side just like a normal window and Place it next to the Script editor nothing difficult

8 years ago | 2

| accepted

Answered
I want to solve this equation in a symbolic form to get the value of j
>> syms J l=160;l7=150;x=205;y=24 eq1=l7*((1-J^2)^0.5)+l*((1-(l7*J+y/l)^2)^0.5)-x==0; SOLUTION=vpasolve(eq1,J) ...

8 years ago | 0

| accepted

Answered
Reference for use of imfill
See <https://www.mathworks.com/help/images/ref/imfill.html> example of filling holes is given clearly

8 years ago | 0

Answered
How can I have my code keep track of the score?
%% Initial Conditions scoreA = 0; scoreB = 0; %% Game for z = 2:100 %error was here loop should st...

8 years ago | 0

| accepted

Answered
can i mark the first point and the last point on my plot
t=[0 20]; y0=[1 0]; [t,y] = ode45(@(t,y) sfunc(t,y),t,y0); plot(t,y(:,1),'blue'); hold on; plot(t,y(:,2),'red')...

8 years ago | 0

| accepted

Answered
Code to zero the elements above major diagonal
Example: A = ones(4) B = tril(A) Or B= tril(A,1)

8 years ago | 0

Answered
How to assign X and Y co-ordinates into a single array (Calculating Mobile User Location)
userloc = [x(:) y(:)] % no need loop to do this

8 years ago | 0

| accepted

Answered
how to interp2 with nan data
Try as the link suggest : <https://www.mathworks.com/matlabcentral/answers/397278-interpolation-of-2d-matrix-using-interp2-to...

8 years ago | 0

Answered
How to make my matrix only store a specifically value
Use logical operation inside a loop comparing the elements of the vector and store them as an index , See what > and < does . Al...

8 years ago | 1

| accepted

Answered
I have a time vector column (T) and i need to plot delta(T) vs T ?
T delta_T = diff(T) plot(delta_T(1:numel(T)),T,'-ob') This will do the trick

8 years ago | 1

Answered
How to remove the scientific notation such as -1.200340354078778e+11 from a matrix?
round((-1.200340354078778e+11),5) Or A=vpa((-1.200340354078778e+11)) round(A)

8 years ago | 0

Answered
loop stop executing after executing nested if statement
for i = 1:m do something; for j = 1:n do something; if conditionIsTrue do somethin...

8 years ago | 1

Answered
how to calculate Somme of vector elements ?
k=1:10.^5; sum(1./(k.^2))

8 years ago | 0

| accepted

Answered
MATLAB source code which accepts a square matrix of any size and computes its inverse using Gauss-Jordan Elimination
maybe see *<https://in.mathworks.com/matlabcentral/answers/99959-is-there-a-matlab-routine-that-uses-the-gauss-jordan-method?s_t...

8 years ago | 0

Load more