Feeds
已回答
Errors occurred during parsing of MATLAB function
The code you have posted may work just fine in MATLAB, but will not work in Simulink. Not all functions are supported for use in...
Errors occurred during parsing of MATLAB function
The code you have posted may work just fine in MATLAB, but will not work in Simulink. Not all functions are supported for use in...
10 years 前 | 0
| 已接受
已回答
controlling what gets saved in command history
You could use the method described in <http://undocumentedmatlab.com/blog/changing-system-preferences-programmatically this post...
controlling what gets saved in command history
You could use the method described in <http://undocumentedmatlab.com/blog/changing-system-preferences-programmatically this post...
10 years 前 | 0
已回答
How to assign user entered values(integers entered in an edit text box) to an already user entered string in a listbox of MATLAB GUI? . Your support would be very useful.
You are creating a struct correctly. However, you should also get the handle to the point when you create it: h = scatter3(...
How to assign user entered values(integers entered in an edit text box) to an already user entered string in a listbox of MATLAB GUI? . Your support would be very useful.
You are creating a struct correctly. However, you should also get the handle to the point when you create it: h = scatter3(...
10 years 前 | 0
已回答
How to solve ODE with measured time series data?
The subscripted assignment dimension error is caused when you try to assign a vector of length 1651x1 to a 1x1 subarray of z_dot...
How to solve ODE with measured time series data?
The subscripted assignment dimension error is caused when you try to assign a vector of length 1651x1 to a 1x1 subarray of z_dot...
10 years 前 | 1
| 已接受
已回答
How do I connect points in a scatter plot with a line?
Don't use a for loop: x=[1,2,3,4,5,6,7,8,9]; y=[1,2,3,4,5,6,7,8,9]; hold on scatter(x,y,'X') line(x,y) o...
How do I connect points in a scatter plot with a line?
Don't use a for loop: x=[1,2,3,4,5,6,7,8,9]; y=[1,2,3,4,5,6,7,8,9]; hold on scatter(x,y,'X') line(x,y) o...
10 years 前 | 2
已回答
Allocation problem using fmincon
The syntax for |fmincon| is WW = fmincon(F,x0,A,b,Aeq,beq,lb,ub) In your code, the initial guess |x0| is a 6x3 matrix, ...
Allocation problem using fmincon
The syntax for |fmincon| is WW = fmincon(F,x0,A,b,Aeq,beq,lb,ub) In your code, the initial guess |x0| is a 6x3 matrix, ...
10 years 前 | 0
| 已接受
已回答
Error in Using set_param
Try set_param('dummy/Constant','Value','50') Note that the value is also a string.
Error in Using set_param
Try set_param('dummy/Constant','Value','50') Note that the value is also a string.
10 years 前 | 0
已回答
Second Order Differential Equations
You can rewrite that system with a constant mass matrix |M|. That is, the system above is equivalent to M * d/dt[x1; x2; x...
Second Order Differential Equations
You can rewrite that system with a constant mass matrix |M|. That is, the system above is equivalent to M * d/dt[x1; x2; x...
10 years 前 | 0
已回答
fmincon for optimal solution
So |F|, |lambda|, and |torque| are the variables, correct? Define |x = [F; lambda; torque]|. Then you can rearrange cons...
fmincon for optimal solution
So |F|, |lambda|, and |torque| are the variables, correct? Define |x = [F; lambda; torque]|. Then you can rearrange cons...
10 years 前 | 0
| 已接受
已回答
Hi, I'd like to adjust a set of points to an expression like this "E=c1*H+c2*H*T^(-2)+c3*T", please help!!...Thanks
This is a linear regression problem, since it is linear in the coefficients. Assuming |E|, |H|, and |T| are column vectors, you ...
Hi, I'd like to adjust a set of points to an expression like this "E=c1*H+c2*H*T^(-2)+c3*T", please help!!...Thanks
This is a linear regression problem, since it is linear in the coefficients. Assuming |E|, |H|, and |T| are column vectors, you ...
10 years 前 | 1
已回答
How to define variables for nested functions
I assume |alpha| is a scalar variable. Then you can write |f|, |g|, and |G| as f = @(alpha) c11(alpha)*KI+c12(alpha)*KII; ...
How to define variables for nested functions
I assume |alpha| is a scalar variable. Then you can write |f|, |g|, and |G| as f = @(alpha) c11(alpha)*KI+c12(alpha)*KII; ...
10 years 前 | 0
已回答
EXTRACT NUMBER FROM A COMBINED STRING AND NUMBERS
If the number is bigger than 9, you can make a slight modification to the answer by David Sanchez: output = str2double(St...
EXTRACT NUMBER FROM A COMBINED STRING AND NUMBERS
If the number is bigger than 9, you can make a slight modification to the answer by David Sanchez: output = str2double(St...
10 years 前 | 0
已回答
how to separate the figures of specific number using matlab ?
Perhaps you want the characters converted back to numbers? If so, try n=123456789 str =num2str(n) strn = regexp(...
how to separate the figures of specific number using matlab ?
Perhaps you want the characters converted back to numbers? If so, try n=123456789 str =num2str(n) strn = regexp(...
10 years 前 | 0
已回答
How can I use xlswrite to specifically write to a cell as text?
I don't have MATLAB in front if me to test it, but you could try adding a single quote before the string, as in xlswrite(...
How can I use xlswrite to specifically write to a cell as text?
I don't have MATLAB in front if me to test it, but you could try adding a single quote before the string, as in xlswrite(...
10 years 前 | 4
| 已接受
已回答
How to find the value of a variable in MATLAB that exists on both sides of th eequal sign?
If you have the Symbolic Toolbox, you can use: >> syms n q r >> solve('2*n+q=n+r','n') ans = r - q
How to find the value of a variable in MATLAB that exists on both sides of th eequal sign?
If you have the Symbolic Toolbox, you can use: >> syms n q r >> solve('2*n+q=n+r','n') ans = r - q
10 years 前 | 0
已回答
How to solve this without goto statement?
for(k2=1e3:1:1e5) for (w=18:1e-4:18.1) x1 = 1/(((-m1*w^2+k1+k2)*(-m2*w^2+k2) - k2^2))*k2*F*1; ...
How to solve this without goto statement?
for(k2=1e3:1:1e5) for (w=18:1e-4:18.1) x1 = 1/(((-m1*w^2+k1+k2)*(-m2*w^2+k2) - k2^2))*k2*F*1; ...
10 years 前 | 0
已回答
how to make a matrix grow inside a parfor loop?
You could make |S| a cell array in the loop, then create a matrix afterward: somefunction = @(x)deal(x,rand(1)<0.3); S=c...
how to make a matrix grow inside a parfor loop?
You could make |S| a cell array in the loop, then create a matrix afterward: somefunction = @(x)deal(x,rand(1)<0.3); S=c...
10 years 前 | 1
提问
How can I run a model in rapid accelerator mode on Linux?
When running a model in rapid accelerator mode in Linux (RHEL 6.4), Simulink reports the model error "Unable to find an unused T...
11 years 前 | 1 个回答 | 0
1
个回答已回答
How many times does each number appear?
Like Cedric, I keep thinking of iterating over interval length. Another way to look at the vector |b| is as the sum of the outpu...
How many times does each number appear?
Like Cedric, I keep thinking of iterating over interval length. Another way to look at the vector |b| is as the sum of the outpu...
11 years 前 | 3
已回答
How many times does each number appear?
Jan Simon's solution is interesting because cumsum can be though of as an IIR filter, and so this idea can further improve the F...
How many times does each number appear?
Jan Simon's solution is interesting because cumsum can be though of as an IIR filter, and so this idea can further improve the F...
11 years 前 | 2
已回答
How many times does each number appear?
You can avoid saving all of the intermediate intervals (e.g., [1 2 3 4]) if you just want the count: a = [1 4;3 5;4 7;6 8]; ...
How many times does each number appear?
You can avoid saving all of the intermediate intervals (e.g., [1 2 3 4]) if you just want the count: a = [1 4;3 5;4 7;6 8]; ...
11 years 前 | 1
已回答
I am not getting the plot graph for this equation.
Presumably you want array division instead of a LS solution. Try s=A+((B*exp(-1.001*((x.^2) + 100)))./((x.^2) +100)) % ...
I am not getting the plot graph for this equation.
Presumably you want array division instead of a LS solution. Try s=A+((B*exp(-1.001*((x.^2) + 100)))./((x.^2) +100)) % ...
11 years 前 | 0
| 已接受
已回答
Passing one element from array of structures
What is in |funct1|? If I define funct1 = @(s)s; then your code works without error.
Passing one element from array of structures
What is in |funct1|? If I define funct1 = @(s)s; then your code works without error.
11 years 前 | 0
已回答
Not Enough Input Arguments in line 2
You need to call this function with an input argument, as in: sumcheck(1) Of course, this is just an example. I have no i...
Not Enough Input Arguments in line 2
You need to call this function with an input argument, as in: sumcheck(1) Of course, this is just an example. I have no i...
11 years 前 | 0
已回答
How can I sort an array of repeating elements
It depends how you want to store the sets. If you are comfortable with cell arrays, you can create one vector with the unique te...
How can I sort an array of repeating elements
It depends how you want to store the sets. If you are comfortable with cell arrays, you can create one vector with the unique te...
11 years 前 | 0
已回答
Help! me set the subscript indices properly so the function can perform while loop iterations
Indices start at 1, so j=0; ... while (1.00<r(j) r(j)<0.99) is referencing a value that does not exist (the 0th val...
Help! me set the subscript indices properly so the function can perform while loop iterations
Indices start at 1, so j=0; ... while (1.00<r(j) r(j)<0.99) is referencing a value that does not exist (the 0th val...
11 years 前 | 0
| 已接受
已回答
too many input arguments error
Where do you define ca2, cb2, ...? Do you need to get those from the value of c2 at each iteration of your loop?
too many input arguments error
Where do you define ca2, cb2, ...? Do you need to get those from the value of c2 at each iteration of your loop?
11 years 前 | 0
已回答
ODE function will not call the OutputFcn
1. The OutputFcn should have the format status = myfun(t,y,flag) but your anonymous function takes a single input (status...
ODE function will not call the OutputFcn
1. The OutputFcn should have the format status = myfun(t,y,flag) but your anonymous function takes a single input (status...
11 years 前 | 0
| 已接受
已回答
Warning: Matrix is singular to working precision. Help?
Do you want array division when you write (u0*I*y)/(2*pi*rplus) and similar expressions? If so, then you need to use ...
Warning: Matrix is singular to working precision. Help?
Do you want array division when you write (u0*I*y)/(2*pi*rplus) and similar expressions? If so, then you need to use ...
11 years 前 | 1
| 已接受
已回答
Index must be a positive integer or logical. Very simple program.
You cannot use the same name for a function and for its output argument. Try function [val]=f(x) val=((x^5...
Index must be a positive integer or logical. Very simple program.
You cannot use the same name for a function and for its output argument. Try function [val]=f(x) val=((x^5...
11 years 前 | 0
| 已接受