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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 1

| akzeptiert

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

| akzeptiert

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

fast 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 2

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

etwa 7 Jahre vor | 1

| akzeptiert

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

etwa 7 Jahre vor | 0

| akzeptiert

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 0

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

etwa 7 Jahre vor | 0

Mehr laden