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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 4

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 1

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

Mehr laden