Answered
If function for matrix
idx=a<b c(idx)=1 c(~idx)=realmin

8 years ago | 0

| accepted

Answered
Open multiple csv files store it in a variable equal to the number of csv files and do some calculation and compare
see <https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html *Processing sequence of files*>

8 years ago | 0

Answered
Computing A(:, m)*B(m, :) without a for loop
C(:, :, 1:M) = A(:, 1:M)*B(1:M, :);

8 years ago | 0

Answered
Is it possible, or is it used to, or is it elegant to change input variables?
Once an input is passed onto the function you can transform(by calculation) it according to your need , if that’s what you meant...

8 years ago | 1

Answered
How to change data type of table in matlab
<https://www.mathworks.com/matlabcentral/answers/347783-change-table-variable-data-type#answer_273279>

8 years ago | 0

Answered
How can I form a matrix of 400 X 7 and multiply values of 1st column of matrix with 4th Column ?
*EDITED* [num,~,~]=xlsread('myexcelfile.xlsx') RESULT = num(:,1).*num(:,3) average = mean(RESULT)

8 years ago | 1

| accepted

Answered
What shall be device type to be selected for TI Boards - TDA2X, TDA4X?
<https://www.mathworks.com/matlabcentral/answers/100600-why-do-i-get-an-error-when-i-try-to-generate-code-with-emlc-for-ti-c6000...

8 years ago | 0

Answered
Using For Loop to find average of columns in a matrix
m=rand(4,365); mean(m,1)

8 years ago | 0

Answered
How to code the linear Splines function?
function out=LSplines(x,pointx,pointy) n=length(pointx); for i=2:n t1(i)= (pointx(i)-x); b1(i)= (pointx(i)-p...

8 years ago | 0

Answered
how to calculate runningmean ?
a=reshape(1:106560,24,4440); %1 to 106650 represents your data means=mean(a,1); size(means)

8 years ago | 0

Answered
How to use polyfit function
x=linspace(0,.27); y=linspace(0,.27); z=polyfit(x,y,4)

8 years ago | 0

Answered
How to plot 2 outputs on same graph, challenge is both of them has different xlim and ylim's.
yyaxis left plot(...) xlim... ylim... yyaxis right plot (...) xlim... ylim...

8 years ago | 0

Answered
ode45 say that return column vector using lsqcurvefit
g = @(x,t) [(-abs(velocity1_int)*a(4)*x(1)*abs(x(1))^(n-1); -a(5)*velocity1_int*abs(x(1))^n+a(6)*velocity1_int)];

8 years ago | 0

Answered
0.0005 comming up as 5.0e-04 help
format short %at the beginning of the code

8 years ago | 0

Answered
Plotting 3D graph in polar coordinates
clear all r=0:1:60; theta=0:pi/30:2*pi; for i=1:61 r(i)=i-1; if (r(i)<3) ...

8 years ago | 0

| accepted

Answered
Combining .mat files to form new multiple .mat files.
see <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwig9_aX5szeAhVLPI8KHU6FAf4QFjAAegQ...

8 years ago | 0

Answered
What kind of function is Matlab using for FEM (PDE toolbox)
see <https://www.mathworks.com/help/pde/ug/basics-of-the-finite-element-method.html> before references

8 years ago | 0

| accepted

Answered
Converting .m to .mat
change .m to .mat

8 years ago | 0

Answered
Index exceeds the number of array elements (1).
clear all; Ca0= 7.72; x0 = [Ca0 0 0 0 ]; tspan = [0 1e2]; [t x] = ode45(@equilibrio,tspan,x0); %FUNCTION CA...

8 years ago | 2

| accepted

Answered
How to convert from polar to complex
5*exp(deg2rad(120)*i) %which is in eulers form r*e^(theta*i) 5 - radius 120 degrees converted to radians see <https:...

8 years ago | 2

| accepted

Answered
function calling in a script
[fd,no]=newton(Cfd,CfD,x,tol,mit) %function call

8 years ago | 0

Answered
Errors when using the function ODE 45
tspan=[0 1]; % To run P-E system %%Initialization eta0=pi/4; r0=sqrt(2); beta0=0; alpha0=pi/4; xP0=0; ...

8 years ago | 1

| accepted

Answered
How can I plot 3D surface x^3 + y^3 + z^3 = 1, where x, y, z are in unit closed interval in MATLAB ?.
syms x y z fimplicit3(x^3+y^3+z^3==1,[-1 1 -1 1 -1 1])

8 years ago | 1

| accepted

Answered
How to remove a bracketed number from a cell array while leaving the number in front of it alone
see <https://www.mathworks.com/matlabcentral/answers/287644-removing-square-brackets-from-string> <https://www.mathworks.com/...

8 years ago | 0

Answered
How do I extract an intermediate variable calculated and used inside my ode45 function?
<https://www.mathworks.com/matlabcentral/answers/92701-how-do-i-pass-out-extra-parameters-using-ode23-or-ode45-from-the-matlab-o...

8 years ago | 0

Answered
Making a histogram with data from excel
[num,~,~]=xlsread('myexcelfile.xlsx') %if it doesn't work upload excel file D=num; histogram(D,10)

8 years ago | 0

Answered
Help with loops _ multiple variables
_"Not expecting someone to write the code but an example using loops for several variables and arrays would be great"_ <ht...

8 years ago | 0

Answered
Using the find function
index = (M>2&M<5); %M greater than 2 and less than 5 Logical indexing is efficient

8 years ago | 0

| accepted

Load more