Answered
Matrix dimension must agree problem
To be honest I didn't get any errors, Try clear all at the very beginning of your code and try again.

7 years ago | 2

| accepted

Answered
Interp1 on a cell array
you may look into fillmissing released in 2016b

7 years ago | 1

Answered
How to say this in MATLAB language?
Welcome to the club ;-) see syms requires symbolic math toolbox syms a b equation=a+b==10

7 years ago | 1

| accepted

Answered
How to solve the symbolic nonlinear equation
syms b2 a c2 c1 b1 theta2 theta1 x1 x2 % x1 is x(1) so is x2 F=zeros(2,1); e1=F(1) == (x1-b2*cos(theta2)+a)^2+(x2-b2*sin(th...

7 years ago | 1

| accepted

Answered
How do I implement this function? What is an example I can use?
legs=[5 7]; h = pythagorean(legs) ; % just call it function h = pythagorean(legs) % hypotenuse = pythagorean(legs) h = (l...

7 years ago | 0

| accepted

Answered
How can i give multiple input values in this function?
EDITED Loop can be avoided: Phi=pi/6:pi/6:11*pi/6; P = myfunc(phi); % function call function P = myfunc(phi) % f...

7 years ago | 1

Answered
How to use if statements with arrays?
Note: The below can be achieved using logical indexing which is easier and less work to do. T = 300:300:1800 y=zeros(1,4); % p...

7 years ago | 2

| accepted

Answered
How do you finish this for loop? It is telling me to define the variable "total", but what do I put in order for it to flow with the loop?
total=0; % you forgot to intialise total ( to define total before usage) for i = 1:5 number = input('Enter a number: '); ...

7 years ago | 0

| accepted

Answered
Losing Format on import.
use readtable() to read the excel file

7 years ago | 0

| accepted

Answered
Round number to just 2 decimals cases
A = [47.1847 18.78417 8.7849 3.3514]; result=fix(A*100)./100

7 years ago | 1

| accepted

Answered
Finding minimum value by using min()
minFit=squeeze(min(Ofitness,[],[1 2])).' minFit=squeeze(min(min(Ofitness))).' % in older versions of matlab thank you sir Walte...

7 years ago | 1

Answered
Error: Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
bankans=cell(NumFrames,Nofilters); for i=1:NumFrames for j=1:Nofilters bankans{i,j}=sum(fft(:,i).* H(j,:)); ...

7 years ago | 0

| accepted

Answered
I require a solution for the set od ODE's using MATLAB function 'bvp4c'
The reason for the error was you gave 7 intitial conditions whereas only 6 are required solinit = bvpinit(linspace(0,1,4),[0.5...

7 years ago | 0

| accepted

Answered
hi everyone, this code says "Index in position 1 exceeds array bounds (must not exceed 1)." Not sure whats wrong
EDITED x=[0:0.1:1; 1:0.1:2]; a=size(x,1); X=cell(1,a); for k=1:a X{k}=x(k,:); end celldisp(X)

7 years ago | 0

| accepted

Answered
How to add 1 into the array
O = M==N

7 years ago | 0

Answered
How to repeat the first number only
a = 1; n = 2; % just an example n a = [zeros(1,n) a]

7 years ago | 1

| accepted

Answered
How to find the marker in the biggest row?
a=[5 2; 7 3; 4 5; 6 5; 8 6; 3 8] [~,Location]=max(sum(a,2)); a(Location,:) %returns largest row

7 years ago | 0

Answered
How can I count the word "the" in a paragraph (a ".txt" file) creating an array?
str=paragraph; str=strsplit(str,' '); nnz(strcmp(str,'the'))

7 years ago | 0

Answered
How to convert unconsistan cell array into 3d matrix?
reshape([data{:}],730,360,[])

7 years ago | 0

| accepted

Answered
Take value from matrix and add value .
S(3,:)=S(2,:); S(3,3)=1

7 years ago | 1

| accepted

Answered
How can I find the more similar vector to another one?
Why not put every 90 vectors as a matrix and separate them with vector F and use sum to sum across columns of each row and use m...

7 years ago | 1

| accepted

Answered
How can I set multiple variables to the same initial value efficiently?
[a,b,c,d]=deal(5)

7 years ago | 2

| accepted

Answered
How could I convert this Python code into Matlab?
https://in.mathworks.com/matlabcentral/answers/3082-is-it-possible-to-run-python-code-in-matlab#answer_316208

7 years ago | 1

Answered
How do I flip the order of cells in a cell array?
However there are better solutions than this , try : result=cell(1,numel(cellarray)); ctr=1; for i =numel(cellarray):-1:1 ...

7 years ago | 0

Answered
how to create an input loop?
EDITED Avoid using global , how about the below?: Save the below as a function with the name inputalpha.m and just call this f...

7 years ago | 0

| accepted

Answered
How plot pole zero of given equation on matlab.
Use transfer function for the given function and then https://www.mathworks.com/help/control/ref/pzplot.html#d120e104363

7 years ago | 0

Answered
linsolve function for C{k}
X{k} = linsolve(reshape([C{k}],6,[]),B)

7 years ago | 0

Load more