質問


How to publish results from the command window in MATLAB
Hi, I ran a code it took 5 hours to give me results in the command window now I want to print the results from the command wind...

4年以上 前 | 3 件の回答 | 0

3

回答

質問


How to use questdlg to ask the user for an action?
I want to ask the user to make a choice on which function to excute the algorithm is as follows: Ask the user "what type of se...

4年以上 前 | 1 件の回答 | 0

1

回答

質問


The crtrp function from the genetic-toolbox doesn't work
Whenever I try to run the code, it gives me an erorr saying: Error: File: crtrp.m Line: 34 Column: 19 "nargin" previously appe...

4年以上 前 | 1 件の回答 | 0

1

回答

質問


I have problem writing a matlab function
I want to write this function in matrix form. The function is I defined the vector as: Then what is wrong with my code? fu...

4年以上 前 | 3 件の回答 | 0

3

回答

質問


A question about sorting a vector
Suppose I have a column vector V of length N and I map every element in V to an element y in Y so, we have a column vector Y of ...

4年以上 前 | 1 件の回答 | 0

1

回答

質問


How to find the position of an element in a vector
Hello, Is there a function in matlab that takes a column vector of n rows and a number as an input and returns its position ...

4年以上 前 | 2 件の回答 | 0

2

回答

質問


How to generate a random integer between two bounds?
Hello, I want to generate a random integer between two integers Suppose the upper bound UP=500 and the lower bound LB=4 how ...

4年以上 前 | 1 件の回答 | 0

1

回答

質問


Why the function "bi2de" only returns non-negative integers, when the description says it returns non-negative real numbers!
I read that the function bi2de takes any binary vector - "a vector composed of only zeros and ones" and returns a non-negative r...

4年以上 前 | 1 件の回答 | 0

1

回答

質問


Why does matlab return "Index exceeds matrix dimensions"?
Hello, Nind=2; %number of vectors Nvar=2; %number of variables in each vector perci=3; %number of bits of every variable p...

4年以上 前 | 0 件の回答 | 0

0

回答

質問


A question about the simple genetic algorithm code
This is a code I found of the genetic algorithm. I am a beginner in MATLAB but I really would like to understand the code. The C...

4年以上 前 | 0 件の回答 | 0

0

回答

質問


Given a column matrix of numbers, how to extract some numbers that meet some condition and save them in a new matrix, if I don't know how many numbers will meet the condition?
Suppose I have a matrix R of n rows and 1 column, suppose I want to extract all numbers from matrix R that are less than or equa...

5年弱 前 | 1 件の回答 | 0

1

回答

質問


Error: The first argument must be a scalar.
I defined a matrix of variables like this X=sym('X', [4,1]) %it looks like this X=[X1 X2 X3 X4]' Then the code did some stu...

約5年 前 | 1 件の回答 | 0

1

回答

質問


Loop over non-numeric stuff
Hello, I defined a vector of variables in my code like this x=sym('x', [m,1]) then I defined a matrix M as follows M=zeros(m...

約5年 前 | 0 件の回答 | 0

0

回答

質問


I have an idea that I want to write in MATLAB language
I am trying to write a MATLAB code that does the following the user should enter 3 vectors (x1, x2, x3) each has 2 components th...

約5年 前 | 1 件の回答 | 0

1

回答

質問


Need some help with a while loop
x0=[0.8 0.8 0.2 0.2]'; tol=1e-6; m0=[0.5 0.5]'; syms x y z p m1 m2 h1=y-(x^3)-(z^2); h2=(x^2)-y-p^2; h=[h1 h2]'; f=-x; ...

約5年 前 | 1 件の回答 | 0

1

回答

質問


Something is wrong in my line search gradient descent code. It gets stuck!
x0=[10 5]'; x0=[10 5]'; tol=1e-6; syms x y f= (1/2)*(x^2)+(9/2)*(y^2); g=gradient(f, [x, y]); g0=subs(g, x, x0(1,1)); g0=...

約5年 前 | 1 件の回答 | 0

1

回答