Answered
How to import multiple files using load function
See Processing sequence of files

7 years ago | 0

Answered
how to calculate the slope of the fitting curve
see https://www.mathworks.com/matlabcentral/answers/234306-how-to-calculate-the-slope-of-a-line#answer_189597

7 years ago | 0

Answered
Error using .* Matrix dimensions must agree
t.' * w1 %matrix multiplication 1 by 48 times 48 by 60

7 years ago | 0

| accepted

Answered
is there a function that let me turn a rational function to a polynomial in matlab?
See poly2sym() (untested) result=poly2sym(x1) why do you think it should be represented in polynomial form?

7 years ago | 0

Answered
Squaring a matrix and how the results matters
Array vs. Matrix operations

7 years ago | 0

Answered
"code never uses indicated local function" error?
root = Newton(x0,tol,MaxIter) %this line have to be before the function root...

7 years ago | 0

Answered
What for command or loop is appropriate?
no loops needed use cumsum instead: cumsum(0.3*ones(1,512))

7 years ago | 0

| accepted

Answered
Help with my code
Matlab is having trouble to solve the equation like sir Walter suggests so i converted it into numerical solution: %SYMBOLIC T...

7 years ago | 0

| accepted

Answered
Trying to make symsum work.
function piram syms k sumpart=symsum((factorial(4*k)*(1103+26390*k))/(((factorial(k))^4)*(396^(4*k))),k,0,inf); inverted=su...

7 years ago | 0

Answered
Signal plotting betweend two points
Piecewise

7 years ago | 0

Answered
hey how can i make column output?
vecPrevMean(i,1)=(sumNum./count)'; % ^---------change to this (note : preallocation is also important)

7 years ago | 0

| accepted

Answered
cumulative average for each element
no loops needed: >> a=1:4 desired_result=cumsum(a)./(1:numel(a)) a = 1 2 3 4 desired_result = ...

7 years ago | 1

| accepted

Answered
Index exceeds matrix dimensions error for summation
You get an error becuase sp2 is a scalar which is 0 and you didn't increment it inside the loop

7 years ago | 0

Answered
Remove NaN values from array and corresponding indices in another array
no loops needed: >> a = [1,2,NaN,3]; b = [4,5,6,7]; b(isnan(a))=[] a(isnan(a))=[] b = 4 5 7 ...

7 years ago | 1

| accepted

Answered
How to show two plots on same graph?
An example: plot(x,y) hold on plot(x1,y1)

7 years ago | 0

Answered
bitget function is not invoking output bits in a vector
You don't need a counter for this case , please pre-allocate before loop! recovered_bits=cell(1,length(A)); %proper pre-allocat...

7 years ago | 0

| accepted

Answered
How to plot the curve of diffrent outputs?
Out=cell(1,5); for i = 1:5; Out{i}=...... your calculation end plot([Out{:}])

7 years ago | 0

| accepted

Answered
error in my maths?
EDITED It's log10() the syntax you were using is applicable only in MUPAD but not in matlab x=data; inter = (x(:,2))/(4.308e...

7 years ago | 1

Answered
Extracting data from single cell in .csv-file using textscan
use readtable() to read the file

7 years ago | 1

| accepted

Answered
any faster/straightforward way to find the location of empty cell in a cell array
index=find(cellfun(@isempty,tmp(:))) %returns index command window: index = 1 2 3 4 10 11 ...

7 years ago | 1

| accepted

Answered
A function that gives the min y-value and its corresponding x-value.
[value,index]=min(y) x(index) y(index)

7 years ago | 1

Answered
How to use sprintf to show variables side by side?
Use %s for letters and %d for numbers look in the documentation what they mean

7 years ago | 0

| accepted

Answered
Using interpl to plot data from a vector
Read interp1() and use appropriate method that you need: xd=[1,2,3,4,5,6] yd=[2.5,3.5,4.5,5.5,6.5,7.5] xx=linspace(xd(1),x...

7 years ago | 0

Answered
How to take a column of matrix and turn it into vector
vector=matrix(:,5)

7 years ago | 0

| accepted

Answered
how to do 1 to 1 matrix multiplication?
C=A.*B %what‘s wrong with this then?

7 years ago | 0

| accepted

Answered
Plot blocks of points with a specific color
EDITED xx = [ 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5]'; yy = [ 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5]';...

7 years ago | 0

Answered
Solving ODE's
option 1; tau(~isnan(E)) E(~isnan(E)) %removes nan values option 2; Let even function play the role it stops the evaluati...

7 years ago | 0

Answered
How to short a character in a cell?
str=' p111012v6' erase(str,'v6')

7 years ago | 0

Answered
anonymous function.problem
clearvars syms t x f = int(t*exp(-t^2),t, 0, x); f=matlabFunction(f) %learn about matlabFunction xmin = fminbn...

7 years ago | 2

| accepted

Answered
I have to combine output(79 matrix of 64 by 1) of a loop into a single matrix of 64 by 79. Kindly add a line in my code
>> y=rand(64,1); N=10112; SC=64; n=(N/2)/SC; Rx_com_t=cell(1,n); for e=1:n Rx_com_t{e}=fft(y); end Rx_com_t =[Rx_com_t{:...

7 years ago | 0

| accepted

Load more