Réponse apportée
How can I guarantee data is placed into the correct spot in a matrix?
He (Doug) means tyhe indices in MATLAB start from 1 not 0. So you have J(1,1) as the first element and J(0,0) returns an error. ...

plus de 13 ans il y a | 0

Réponse apportée
Generating code from simulink
Which target are you generating code for? (grt or ...?) You might want to reduce the model by removing the blocks and signals...

plus de 13 ans il y a | 0

Réponse apportée
How can i save multiple variables in a text file, including the variable names
myfilepath = 'C:\myfile.txt'; fid = fopen(myfilepath, 'wt'); fprintf(fid, '% this is the beginning of my file'); fp...

presque 14 ans il y a | 1

| A accepté

Question


TLC equivalent of find_system(...)
For Target Development/ code generation, I need to edit the ert_file_process.tlc file. In this file I need to write a few lin...

presque 14 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
rearrange system of equations
You could use the Simbolic Math toolbox and its commands to do all these. syms, subs, vpa would be commands in Simbolic Math to...

presque 14 ans il y a | 0

Réponse apportée
How to create a vector?
vector=[]; for j=1:n % find newone that comes from file(j) vector = [vector , newone] end

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Iteration of Matrix in equation
Write a for loop and then iterate n times like this: n=5; number_of_states=12; A = ones(12,12); B = ones(12,1); x=...

presque 14 ans il y a | 0

Réponse apportée
find the line equation of two points in 3D
To find the intersection of two lines (curves) for which you have numerical data, like f(n) and g(n) you can first compute h(n) ...

presque 14 ans il y a | 0

Réponse apportée
How to get the area between two curves?
You can integrate the difference between two curves to get the signed area between them. If you are looking for an unsigned a...

presque 14 ans il y a | 0

Réponse apportée
can any one send me a code?
Look into the File Exchange section.

presque 14 ans il y a | 0

Réponse apportée
How can I generate a Command Window error from Simulink block mask editor (Initialization Tab)?
disp() command would display whatever you want to display in the command window.

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Adding New Menu in SImulink
Yes it is possible. Look up sl_customization(cm) on MATLAB's documentation. You need to write a function whose name must b...

presque 14 ans il y a | 0

Réponse apportée
Copying and replacing of some values
a=[1 5 7 11 14 15 16 12 90 33 46 78 79 66]; b=[2 8]; n=3; c = a; for j=1:length(b) if length(a)>b(j) index ...

presque 14 ans il y a | 1

Réponse apportée
ode23s, ode15s, what to use?
As for the discrepansy of ODE15s and ODE23s or ODE23tb 's responses, I would suggest you to integrate the equations for a very s...

presque 14 ans il y a | 0

Réponse apportée
How to display the Xticks from the command line?
x = -pi:.1:pi; y = sin(x); plot(x,y) set(gca,'XTick',-pi:pi/2:pi) set(gca,'XTickLabel',{'-pi','-pi/2','0','pi/2','pi'}) ti...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to customize a Built-in PID Block?
You don't want to edit Simulink's Built in blocks. Instead you want to create your own custom blocks. You could do it with cr...

presque 14 ans il y a | 0

Réponse apportée
bisection method - can't see error in code
In the while loop while abs(m)>epsilon ; if Fb*Fm <0 a=m else b=m end end you are no...

presque 14 ans il y a | 0

Réponse apportée
Which is a better approach to solve the following set of equations?
In regards to the time step, you can use any ODE solver but determine the time step to be in the form of linspace(0,100,51)...

presque 14 ans il y a | 0

Réponse apportée
Cross section plot for 2D plot
Do you need to find the intersection of a 1D line and a curve that has been plotted in a 2D plane? Did I understand your pro...

presque 14 ans il y a | 0

Réponse apportée
How can I calculate the number of data points within the area of a cirle
Here is how you do it for numbers in a circle: x = [6 -5 -2 3 -1 0 2 1 8 -12 7 6 -6 5 -7 41 3 ]; y = [3 2 -4 -4 -1 77 8 ...

presque 14 ans il y a | 0

Réponse apportée
How can I calculate the number of data points within the area of a cirle
data = [25 4 -10 -8 20 -5 -15 2 12 22 1000]; range = [-10 10]; % data-range(1)>0 % data-range(2)<0 sum((data-range(1)...

presque 14 ans il y a | 0

Réponse apportée
Minimize function by choosing a variable that enters indirectly
I wouldn't use an inline function like @(Bbin)... for this case. I would do it this way: Write a function like this: (untest...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Error message for tspan in ode45
You get this error when your timespan is incorrectly set up. Example of incorrect timespan: [0 0] [0:0.01:10 9] Corr...

presque 14 ans il y a | 0

Réponse apportée
nonlinear differential equation system
If you are trying to solve it numerically with some numbers as initial conditions, you can use MATLAB's built in ODE solvers lik...

presque 14 ans il y a | 0

Réponse apportée
Usage of SUBS for the calculation of the intersection of a circle and an ellipse
first, your equation involves CAPITALIZED T while you are trying to solve it for little t. You need to stay consistent. secon...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
problem in return code
"return" command, ends the execution of the code. "return" does not mean that the code is going to start from the beginning ...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
Explicit integral could not be found.
Mathematica finds the indefinite integral of f over x <http://integrals.wolfram.com/index.jsp?expr=x%5E3*exp%281%2Fx%5E2%29*%...

presque 14 ans il y a | 0

Réponse apportée
How to construct a table with several matrices
mytable=cell(2,2); mytable{1,1}=[1 0.5; 0.5 1]; mytable{1,2}=[1 -0.5; -0.5 1]; mytable{2,1}=[0.4 1; 8.0 2.0]; ...

presque 14 ans il y a | 0

Réponse apportée
immense difference between continous and discrete state space model
I edited your code: Ra = 2.06; La = 0.000238; k_phi = 1/((406*2*pi)/60); J = 1.07e-6; ...

presque 14 ans il y a | 0

Réponse apportée
solution for integration of following expression.
A general form for the indefinite integral of your problem does not exist. Take y = exp(a*x) and transform the integral over ...

presque 14 ans il y a | 0

| A accepté

Charger plus