Risposto
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))'

circa 7 anni fa | 1

| accettato

Risposto
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/...

circa 7 anni fa | 0

| accettato

Risposto
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...

circa 7 anni fa | 0

| accettato

Risposto
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...

circa 7 anni fa | 0

| accettato

Risposto
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;...

circa 7 anni fa | 1

| accettato

Risposto
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...

circa 7 anni fa | 0

Risposto
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*...

circa 7 anni fa | 0

Risposto
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 ...

circa 7 anni fa | 0

| accettato

Risposto
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>

circa 7 anni fa | 0

Risposto
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...

circa 7 anni fa | 0

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

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

circa 7 anni fa | 1

| accettato

Risposto
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....

circa 7 anni fa | 1

| accettato

Risposto
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...

circa 7 anni fa | 0

| accettato

Risposto
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...

circa 7 anni fa | 0

| accettato

Risposto
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...

circa 7 anni fa | 0

Risposto
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 =...

circa 7 anni fa | 1

| accettato

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 1

| accettato

Risposto
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>

circa 7 anni fa | 0

| accettato

Risposto
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 ...

circa 7 anni fa | 0

| accettato

Risposto
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...

circa 7 anni fa | 2

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

circa 7 anni fa | 1

| accettato

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

Risposto
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)

circa 7 anni fa | 0

Risposto
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...

circa 7 anni fa | 0

Carica altro