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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

Respondida
Write a function called freezing that takes a vector of numbers that correspond to daily low temperatures in Fahrenheit. Return numfreeze, the number of days with sub freezing temperatures (that is, lower than 32 F) without using loops. Here is an ex
function numfreeze = freezing (n) n1 = n(n<32) numfreeze = numel(n1) end Dont overwrite n - it is an input argument

alrededor de 7 años hace | 2

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 2

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

alrededor de 7 años hace | 1

| aceptada

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

alrededor de 7 años hace | 0

| aceptada

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

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

alrededor de 7 años hace | 0

Cargar más