Respondida
Creating the uniform distribution on [0,2pi) for 1000 times
Hi, dont start with n=0: for n = 1:1:1000 theta(n)=0+(2*pi)*rand(1,1); end The better way (without loop) is fo...

casi 8 años hace | 1

| aceptada

Respondida
Predict y values from x values
Hi, many options to do this - here you have 3 of them. All options start with your known code and want to know the x-value fo...

casi 8 años hace | 1

| aceptada

Respondida
How can I find the elements of a matrix that are lower than a given number and the minimum of those elements?
Hi, A = hilb(70); B = A(A < 0.01); % copy all elements <0.01 into vector B; C = min(B) % get the min value ...

casi 8 años hace | 1

| aceptada

Respondida
Can someone explain this error?
Hi, try to run Matlab as an administrator. Best regards Stephan

casi 8 años hace | 0

| aceptada

Respondida
How can I insert the output of 'Polyfitn' directly to an optimization function in the same code?
Hi, the problem you have is X1, X2 and X3 can not be passed to your function handle by ga, when ga tries to find optimal valu...

casi 8 años hace | 0

| aceptada

Respondida
A question regarding a optimization problem by using "fmincon" solver.
Hi, is it what you want: A=[-1 -2 -2;... 1 2 2]; b=[0;72]; x0=10*ones(1,3); lb=2*ones(1,3); ub=100*...

casi 8 años hace | 0

Respondida
How to reverse a duration?
Hi, doing the same with a duration gives a double: a = minutes(2) whos a b = minutes(a) whos b See also here: ...

casi 8 años hace | 0

| aceptada

Respondida
training svm in matlab with multiple data set
Hi, merge your data, so that all data sets are in one table. You can not train a model successively. You need to use the whol...

casi 8 años hace | 0

Respondida
Failure in initial user-supplied objective function evaluation
Hi, function myfun %parameters mh=.7; mv=1.2; dha=0.2; dhc=0.5; qa=0.1; ...

casi 8 años hace | 0

| aceptada

Respondida
Why would chol fail?
Hi, L*L' is not the same as L'*L The way you do use <https://de.mathworks.com/help/matlab/ref/chol.html |chol...

casi 8 años hace | 0

| aceptada

Respondida
How to calculate the standard deviation of the signal
Short Question, short Answer: <https://de.mathworks.com/help/matlab/ref/std.html> val = 0.9135 0.0073...

casi 8 años hace | 0

Respondida
How to run .m file in python
Hi, this is not a big deal. The python code looks like: import matlab.engine eng = matlab.engine.start_matlab() en...

casi 8 años hace | 4

| aceptada

Respondida
Getting data from specific columns in a table
You get data from a table by using the dot-notation. Therefore use the name of the column. If your columns are named 1...6 use ...

casi 8 años hace | 1

| aceptada

Respondida
sorting in descending order by row
Hi, use: A = 10 -12 4 8 6 -9 8 0 2 3 11 -2 1 1 ...

casi 8 años hace | 1

Respondida
Problem with solve and syms variable
Hi, use: syms t and solt = double(solve(vGS == VT, t)); instead of: syms t var vGS and solt ...

casi 8 años hace | 0

| aceptada

Respondida
Swap between two sub array of an array
If i assume that you want to swap idx which have the same length: A = [2 5 3 4 7 1 6 9 8 10 11 12] idx1 = [2 4]; ...

casi 8 años hace | 1

| aceptada

Respondida
I want to plot mat file
Hi, s = load('signal.mat'); will give you a struct s containing fields with your variable(s) in it. Access this data f...

casi 8 años hace | 1

| aceptada

Respondida
Error using ^ Incorrect dimensions for raising a matrix to a power whren trying to simulation a transient reactor
Hi, consider: >> A = [1 2 4; 5 8 9] A = 1 2 4 5 8 9 >> A^2 Erro...

casi 8 años hace | 0

Respondida
Averaging data with slightly different time values
Hi, a further approach would be not to manipulate data, but use all the Information the data contains and make a fit function...

casi 8 años hace | 0

| aceptada

Respondida
i am not getting correct output for this plot
Hi, the reason for this behavior is that your sampling rate (t) is 100 Hz. The steps of t = 0.01 and the integer multiples of...

casi 8 años hace | 0

| aceptada

Respondida
What is the correct handle for a scatter plot with 2 y-axes?
Hi, see the R2015b documentation for how to: <https://de.mathworks.com/help/releases/R2015b/matlab/creating_plots/plotting...

casi 8 años hace | 0

Respondida
Query regarding a sparse complex matrix
Hi, the resulting size of the sparse matrix depends from the number of zero entries. Consider this: A = randi(10,100...

casi 8 años hace | 0

| aceptada

Respondida
How can i describe this inequality on fmincon command?
Hi, due to |x²| you have to use a nonlinear inequality. See details here: <https://de.mathworks.com/help/optim/ug/fmincon....

casi 8 años hace | 1

| aceptada

Respondida
i need to make integrat for this equation from 0 to x ,, with respect to x ,,i make several program but i cant reach to my object
Hi, syms g(x) a m E g(x) = (sqrt(2*m*(E-(a.*x)))) G(x) = int(g(x),x) pretty(G(x)) gives the indefinite integra...

casi 8 años hace | 1

| aceptada

Respondida
How do I create a vector that increases in size with decreasing increments?
Hi, this could meet your requirements: a = 10; x = 0:10; y = a*exp(-1./x); plot(x,y) gives: y = ...

casi 8 años hace | 0

Respondida
Symbolic tool box is not working on my system. A simple command like syms x is taking infinite time and my whole system gets stuck. Can somebody help.
Hi, this is an <https://de.mathworks.com/support/bugreports/1755918 known problem> in 2018a and 2017b when OS is Windows 10 -...

casi 8 años hace | 0

| aceptada

Respondida
reversing the inverse hyperbolic sine function
Hi, if you have symbolic math toolbox use <https://de.mathworks.com/help/symbolic/finverse.html |finverse|> to do this for th...

casi 8 años hace | 0

Respondida
How can i solve this integration using newmark?
Hi, in your for loop is an <https://de.mathworks.com/help/matlab/ref/end.html?s_tid=doc_ta |end|> missing. I guess that this ...

casi 8 años hace | 0

| aceptada

Respondida
How can i get license for online matlab?
Hi, you need an current license to use it. Check here for more details: <https://de.mathworks.com/products/matlab-online.h...

casi 8 años hace | 0

Respondida
Hello, i am using Matlab 2017a, and i am trying to plot simple thing like plot(1:100, 1) but i got blank plot. If i tried plot(1:100, 1, '*') then it gives correct plot... can u please help me out with issue.
Hi, this behavior is described in the documentation of the <https://de.mathworks.com/help/matlab/ref/plot.html?s_tid=doc_ta#b...

casi 8 años hace | 0

Cargar más