Answered
px{i}.part(:,1) what does this mean?? help
The dot means, that the corresponding variable is created as a struct with a field called 'part'. See: doc struct "px{i}.part(...

5 years ago | 0

| accepted

Answered
Functions or classes...............
1) what is the technical differences while coding in functions or classes You can write a book over object oriented programming...

5 years ago | 1

| accepted

Answered
How add another loop in program
The only problems I see is that value1/2/3 is not initialized and that the division is /, not \ . c2 is not used, so omit it. ...

5 years ago | 0

| accepted

Answered
Solve a set of ODEs with given initial conditions and final conditions
If you have some initial and some final values, this is not an IVP (initial value problem), but a BVP (boundary value problem). ...

5 years ago | 0

| accepted

Answered
how to develop n order matrix?
With some guessing: You want a tridiagonal matrix with the right bottom element changed. Then: n = 4; K = diag(repmat(2000, 1,...

5 years ago | 0

Answered
Int function not working
See: doc int The 1st argument must be: symbolic expression | symbolic function | symbolic vector | symbolic matrix | symbolic ...

5 years ago | 0

Answered
I'm solving a coupled set of ODEs. It solves, but the behaviour of the plot is not as expected. Please can some help me check? Thanks kidnly
There is a minus in the equation for dM/dt, so you need: dx(1) = -pi * q * R^2 / L_lng; Use pi instead of pii = 3.142 to reduc...

5 years ago | 1

Answered
How to get from a array to a vector
Vectors are arrays. Your code does not use iter_h anywhere. It can be simplified to: n = 10; x = rand(n, 1); h = diff(x);

5 years ago | 0

| accepted

Answered
Getting the if or while loop to work
while i == 4 SLPS=[1 0 0 0;0 h(1) 2*(h(2)+h(1)) h(2);0 0 h(2) 2*(h(3)+h(2));0 0 0 h(3)] end This is, as you have seen...

5 years ago | 0

| accepted

Answered
win zip install error 2021a
The administrator does not have write access to the desktop folders of the users. Choose a folder outside the user's personal f...

5 years ago | 0

Answered
handles for functions of several variables
Do you get an error message? What is x1 and x2 in your functions "f_function" and "J_function"? Do you mean: x(1) and x(2) ? B...

5 years ago | 0

Answered
Combining columns of two matrices
If you want to find all combinations of 2 values, simply use two loops: for x = 1:size(Appartment, 2) App = Appartment(:,x...

5 years ago | 0

| accepted

Answered
I tried for 4hrs and still cant come up with the right command. .
I assume, this is meant: A = [1 2 3; 4 5 6; 7 8 9] A(1, :) A(:, 2)

5 years ago | 1

| accepted

Answered
How to vectorize A\B operation on slices of 3D matrices?
Do you have a compiler installed? Then use: https://www.mathworks.com/matlabcentral/fileexchange/37515-mmx

5 years ago | 1

Answered
Merging structs that are similar but not identical
With some guessing: % Read the files at first: for k = 1 : numFiles fprintf('Now reading file %s\n', fullFileNames{k}); ...

5 years ago | 0

Answered
I am trying to solve the question for two stage rocket but i keep getting errors.
It is confusing that you mix e.g. "t2" and "t_2". In the failing line, v_coast1 = vbo1 -(g0.*t_2); t_2 is not defined, but...

5 years ago | 0

Answered
How to get this into a loop
Why do you want a loop? It is working without a loop also - guessing that you mean x(1, 2) and not x(2, 1) as in the code in the...

5 years ago | 0

Answered
ploting second derivative from second order differential equationn
The easiest solution is to let the function to be integrated accept vectors as input and call it with the time steps and positio...

5 years ago | 1

| accepted

Answered
Check for missing argument or incorrect argument data type in call to function 'smooth'.
Do you call the built-in function smooth or did you shadow it with a user-defined function? See: which smooth -all Please post...

5 years ago | 1

Answered
How do I use multiple variables in a for loop, that rely on each other?
This looks strange: S2 = zeros(size(0:n-1)); It is working, but you do know the size of a 0:n-1 vector already, don't you? S2...

5 years ago | 0

Answered
Assign group labels to vectors of different and large lengths
Either: group1 = repmat(label1, length(y1), 1); group2 = repmat(label2, length(y2), 1); group = [group1; group2]; % ...

5 years ago | 0

| accepted

Answered
How to use Eventfunction for this ODE set?
y0 = [1,2,3,4]; t0 = 0; tEnd = 42; opt = odeset('Tol', 1e-8); y = y0; t = t0; while t(end) < tEnd if -y(2) > ...

5 years ago | 1

Answered
Save ans file into a seperate file
I don't get what the problem is. What about: Data{1} = import_ForceCoeff('AoA_5_WITHOUT_Tail_NACA_0012_forceCoeffs_0.txt'); Da...

5 years ago | 0

Answered
Improving code performance by compiling
Optimization of code is done in different steps: Write the code as clean and clear as possible. Do not start with a pre-mature ...

5 years ago | 0

| accepted

Answered
Shanon entropy of a matrix
As the documentation tells, the input is expected to be a gray scale image. Then value over 1.0 are limit to 1.0 and you matrix ...

5 years ago | 1

| accepted

Answered
sorting cell arrays based on nested cell array?
score = {'Name', 'Score', 'Rating'; ... 'Messi', {{97}}, {[9.75]}; ... 'Ronaldo', {98}, {[9.8]}; .....

5 years ago | 0

| accepted

Answered
Using "fullfile" to add a predefined date to a filename
You code will be faster if you omit the useless "clear all", which removed all loaded functions from the memory. Afterwards all ...

5 years ago | 0

| accepted

Answered
Out of Memory, The size of the indicated variable or array appears to be changing with each loop iteration. Undefined function or variable 'Feat1'.
You cannot get multiple errors, because Matlab stops at the first error already. So please post a full copy of the complete mess...

5 years ago | 1

| accepted

Answered
using ode45 using while loop
I am getting the value of [at,ay] but when the second case starts the [at,ay] values overwrite the previous at and ay values. W...

5 years ago | 0

| accepted

Answered
Solving vectorized ODE (Solving same ODE with many initial conditions at once).
same ODE with many initial conditions at once This is a bad idea. Remember that the step size control is triggered by the most ...

5 years ago | 1

Load more