Answered
I have a multi dimension matrix (:,:,:) that I need to export to excel
If it would be acceptable to have all matrices in one excel sheet, you could use: A = (reshape(your_matrix,5,[],1))'

6 years ago | 1

| accepted

Answered
I have 100 data scattered across 100 X 100 size plot. I need to partition the plot into four sub-sections across the center. Can anyone help me.
starting from R2018b you can use <https://de.mathworks.com/help/matlab/ref/xline.html xline> and <https://de.mathworks.com/help/...

6 years ago | 0

| accepted

Answered
how to make loop in
%km = 72x1 (matrix) x = zeros(25,1); % preallocate for x=1:25 cx(x) = Km(x,1)+Km(x+1,1)+Km(x+6,1)+Km(x+7,1)+Km(x+36,1)+Km(x...

6 years ago | 0

| accepted

Answered
Are the operators like " .* ", " ./ " won't work in simulink?
It is a parameter: <https://de.mathworks.com/help/simulink/slref/product.html#brofebg> <https://de.mathworks.com/help/sim...

6 years ago | 0

| accepted

Answered
solving two symbolic equations simultaneously
syms x y a b eq1=a==x+y; eq2=b==x-y; [xsol,ysol]=solve([eq1 eq2],[x y]) sol.x sol.y or: syms x y a b eq1=a==x+y;...

6 years ago | 1

| accepted

Answered
Function definitions are not permitted in this context
Add the missing end after line 148 (from your outer while loop) to get rid of this error. This end is missing, so Matlab...

6 years ago | 0

Answered
how to solve these equations
for only real solutions: syms a b c d real eq(1) = a^2+b*c==-1; eq(2) = a*b+b*d==1; eq(3) = a*c+c*d==-1; eq(4) = d^2+b*...

6 years ago | 0

Answered
how to get combination of elements in a matrix in pair order
A=[3 5 6 7 8]; b = nchoosek(A,2) b = 3 5 3 6 3 7 3 8 5 6 ...

6 years ago | 0

| accepted

Answered
Can I using Genetic Algorithm to solve a integer quadratic problem?
<https://de.mathworks.com/help/gads/solving-a-mixed-integer-engineering-design-problem-using-the-genetic-algorithm.html>

6 years ago | 0

Answered
how to convert .mat file to .m file in matlab R2019a version
You can not convert *.mat to *.m files. The *.mat format saves variables from workspace and the *.m file format saves Matlab cod...

6 years ago | 0

Answered
Rearranging an equation containing the linsolve function
Residuals = CoefficientsMatrix*A

6 years ago | 0

| accepted

Answered
sum matrix column to get another matrix
G1 = squeeze(sum(G,2));

6 years ago | 0

| accepted

Answered
remove Nan from a row vector using if statement only
Datan=ch(~isnan(ch));

6 years ago | 0

Answered
Solve Function - Having Difficulties
syms x xsol = solve(str2sym('x+4==2'),x)

6 years ago | 1

| accepted

Answered
error using sym/subs with logical operation
1 You only substitute x1 - you have to substitute them both. Try: syms x1 x2 aa= x1 == 0 & x2 == 0 aa = subs(aa,[x1 x2], [0....

6 years ago | 1

| accepted

Answered
how i can use roots in matlab
RHS has to be zero, then put the coefficients in descending order into a vector - read here: https://de.mathworks.com/help/matl...

7 years ago | 0

| accepted

Answered
Evaluating a symbolic expression numerically without invoking the syms command
Save them as function handle in your .mat file. This allows you to use them numerical. <https://de.mathworks.com/help/symboli...

7 years ago | 0

| accepted

Answered
Can genetic algorithm be nested?
It should be possible in one single call of ga. In this case nvars would be 2*numel(q) and you have to set the correct bounds an...

7 years ago | 0

Answered
How can I determine the indices and length of consecutive non-NaN values in an array?
1. FInd the indexes: B = find(isnan(A)) 2. To find consecutive blocks you could use the diff function on a logical array: C =...

7 years ago | 1

| accepted

Answered
Regarding the solver time
https://de.mathworks.com/help/matlab/performance-and-memory.html https://de.mathworks.com/help/matlab/matlab_prog/profiling-for...

7 years ago | 0

| accepted

Answered
hourly mean value from 10 second data
Put your data in a timetable and use the retime function.

7 years ago | 1

| accepted

Answered
Importing a CSV into a Timetable
<https://de.mathworks.com/help/matlab/ref/datetime.html?s_tid=doc_ta#mw_963bdeb5-a675-4457-af6a-4295e37d52cc>

7 years ago | 0

| accepted

Answered
why am i getting 'Illegal use of reserved keyword "elseif" while running this program?
change the line % designate gait characteristic if rv <= 0 to % designate gait characteristic if rv <= 0 ...

7 years ago | 0

| accepted

Answered
Solving system of non-linear trigonometric symbolic equations
syms theta1 theta2 theta3 theta4 format long M_SUM = [(cos(theta1) + sin(theta1)/2)*(cos(theta1)/2 + sin(theta1)) + (cos(the...

7 years ago | 2

Answered
Optimisation - fmincon error
Rename your script. NEVER name a script like an inbuilt function. This causes exactly the error you get.

7 years ago | 1

| accepted

Answered
Difficulty implementing simulated annealing algorithm
rng default % For reproducibility x0 = [0.5 0.5]; % Starting point [x,y,flag,output] = simulannealbnd(@simple_objective,x0) ...

7 years ago | 0

| accepted

Answered
I am trying to get non-negative values for the lsqlin function
https://de.mathworks.com/help/matlab/ref/lsqnonneg.html

7 years ago | 0

Answered
creating a new column with three columns
Works also if the number of lines or columns is different to 25x3: a = [col1 col2 col3] b = reshape(a',[],1)

7 years ago | 0

Answered
How can I use GA to specific variants with discrete variables?
Maybe you are interested in this question - and of course the answer: https://de.mathworks.com/matlabcentral/answers/401059-set...

7 years ago | 0

Load more