回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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 ...

7年以上 前 | 1

| 採用済み

回答済み
Can someone explain this error?
Hi, try to run Matlab as an administrator. Best regards Stephan

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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*...

7年以上 前 | 0

回答済み
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: ...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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; ...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 4

| 採用済み

回答済み
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 ...

7年以上 前 | 1

| 採用済み

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

7年以上 前 | 1

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
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]; ...

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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....

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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 = ...

7年以上 前 | 0

回答済み
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 -...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

さらに読み込む