201 total contributions since 2017

Knowledge means knowing where it is written...

Interested in:

- Optimization

- Mathematical Modelling

- Improvement of my programming skills

Answered

Referencing Arbitrary Functions from other Script Files to Solve System of Equations

Hi, This looks like your script bfield is missing a function [what ever comes out] = bfield (whatever goes in...

Referencing Arbitrary Functions from other Script Files to Solve System of Equations

Hi, This looks like your script bfield is missing a function [what ever comes out] = bfield (whatever goes in...

11 hours ago | 0

Answered

How to solve a equation that appears z2

Hi, to get numeric solution use: vpasolve(eqn,Sig) after assigning values to the other variables. Best regards ...

How to solve a equation that appears z2

Hi, to get numeric solution use: vpasolve(eqn,Sig) after assigning values to the other variables. Best regards ...

1 day ago | 0

Answered

accessing data from a struct

Hi, A = R.X assigns the Matrix saved in the field X of the struct R to A. % define empty struct R = struct(...

accessing data from a struct

Hi, A = R.X assigns the Matrix saved in the field X of the struct R to A. % define empty struct R = struct(...

2 days ago | 0

| accepted

Answered

Genetic Algorithm : Lower and Upper Bounds

Hi, the handling of bounds in the case of the use of ga is very well described here: <https://de.mathworks.com/help/gads/c...

Genetic Algorithm : Lower and Upper Bounds

Hi, the handling of bounds in the case of the use of ga is very well described here: <https://de.mathworks.com/help/gads/c...

2 days ago | 0

| accepted

Answered

bar chart with hold on

Hi, x = [9,10,11,12,13,14]; x1 = [1,2,3,4,5,6]; y = [2,4,5,6,7,8]; y1 = [3,2,4,5,6,9]; h = bar([x x1],[y y1]);...

bar chart with hold on

Hi, x = [9,10,11,12,13,14]; x1 = [1,2,3,4,5,6]; y = [2,4,5,6,7,8]; y1 = [3,2,4,5,6,9]; h = bar([x x1],[y y1]);...

3 days ago | 0

| accepted

Answered

Plotting the left and right side of a tricky equation?

Hi, this works also on R2018a: <</matlabcentral/answers/uploaded_files/125793/fplot_test.PNG>> Try the following: ...

Plotting the left and right side of a tricky equation?

Hi, this works also on R2018a: <</matlabcentral/answers/uploaded_files/125793/fplot_test.PNG>> Try the following: ...

4 days ago | 0

| accepted

Answered

I am trying to solve these coupled equations using ode45...I have attached both the function file and script file...

Hi, write your function in a way that it returns a column-vector like below. Then fix the error regarding your plot, which ap...

I am trying to solve these coupled equations using ode45...I have attached both the function file and script file...

Hi, write your function in a way that it returns a column-vector like below. Then fix the error regarding your plot, which ap...

4 days ago | 0

Answered

Solve for y when it cant figure it out in y=f(x) form. Need to solve in matlab function block in simulink

Hi, you can do so: syms x y % Starting Point fun = 0.364*(y-0.024)-sqrt(0.00060025-(0.009+y)^2) == 0.048*(x-0....

Solve for y when it cant figure it out in y=f(x) form. Need to solve in matlab function block in simulink

Hi, you can do so: syms x y % Starting Point fun = 0.364*(y-0.024)-sqrt(0.00060025-(0.009+y)^2) == 0.048*(x-0....

5 days ago | 0

Answered

I want to know how this code is working.

Hi, lhe logical array inside the A(...) gives back all the values where the index represented by the logical array is true. T...

I want to know how this code is working.

Hi, lhe logical array inside the A(...) gives back all the values where the index represented by the logical array is true. T...

6 days ago | 1

| accepted

Answered

Solving for level curves of an elliptic paraboloid given by quadric surface equation

Hi, here is an approach - free for play with it and improvement... Just to let you start: % Define a function to play wi...

Solving for level curves of an elliptic paraboloid given by quadric surface equation

Hi, here is an approach - free for play with it and improvement... Just to let you start: % Define a function to play wi...

6 days ago | 1

| accepted

Answered

Problem when using "solve" command

Hi, in your code there is a closing parenthesis missing at the end of the equation - use this: syms V R gamma r Qi eq...

Problem when using "solve" command

Hi, in your code there is a closing parenthesis missing at the end of the equation - use this: syms V R gamma r Qi eq...

6 days ago | 0

Answered

Can linprog run using decimals in the "f" and "Aeq" matrices?

Hi, there is no need to have integers. See <https://de.mathworks.com/help/optim/ug/linprog.html |linprog|> documentation for ...

Can linprog run using decimals in the "f" and "Aeq" matrices?

Hi, there is no need to have integers. See <https://de.mathworks.com/help/optim/ug/linprog.html |linprog|> documentation for ...

7 days ago | 0

Answered

Classification Learner App vs. Training and testing a model programmatically, Is there any hidden magical step in the classification learner app?

Hi, A possible way to do this is working with the app and then, when you got a good result, export the code to matlab. This a...

Classification Learner App vs. Training and testing a model programmatically, Is there any hidden magical step in the classification learner app?

Hi, A possible way to do this is working with the app and then, when you got a good result, export the code to matlab. This a...

7 days ago | 1

Answered

How to get coefficient values(such as %)of gaussian fit?

Hi, look this: <https://de.mathworks.com/matlabcentral/answers/404352-how-to-access-the-result-of-curve-fit-app-in-the-wor...

How to get coefficient values(such as %)of gaussian fit?

Hi, look this: <https://de.mathworks.com/matlabcentral/answers/404352-how-to-access-the-result-of-curve-fit-app-in-the-wor...

7 days ago | 0

| accepted

Answered

What are the fitcecoc settings for a tie between classes?

Hi, You can do this through a cost matrix that penalizes unwanted misclassification. See the section in the documentation: ...

What are the fitcecoc settings for a tie between classes?

Hi, You can do this through a cost matrix that penalizes unwanted misclassification. See the section in the documentation: ...

7 days ago | 0

| accepted

Answered

How to encounter errors like 'Solver stopped prematurely' and 'Failure in initial objective function evaluation. FSOLVE cannot continue.'?

Hi, i can only give you about 1.5 answers of the 2 you asked: *Answer on sub-question 1.* In your function F (x) there ...

How to encounter errors like 'Solver stopped prematurely' and 'Failure in initial objective function evaluation. FSOLVE cannot continue.'?

Hi, i can only give you about 1.5 answers of the 2 you asked: *Answer on sub-question 1.* In your function F (x) there ...

8 days ago | 0

Answered

For a contour how to set the values of a matrix to zero for certain values of x-axis.

Hi, does this what you expect? z = rand(20,21); x = linspace(-10,10,20); y = linspace(0,20,21); z(x<0,:) = 0;...

For a contour how to set the values of a matrix to zero for certain values of x-axis.

Hi, does this what you expect? z = rand(20,21); x = linspace(-10,10,20); y = linspace(0,20,21); z(x<0,:) = 0;...

9 days ago | 0

Answered

Transferring MATLAB 2008a to new laptop

Hi, you can go to the license center at mathworks.com and visit the section of your own licenses. When you choose the tab _in...

Transferring MATLAB 2008a to new laptop

Hi, you can go to the license center at mathworks.com and visit the section of your own licenses. When you choose the tab _in...

9 days ago | 0

Answered

How to create function handle from fit struct after using curve fitting toolbox?

Hi, Why do you need this? You can directly compute new values for your fitresult: y_new = fitresult(x_new) This retur...

How to create function handle from fit struct after using curve fitting toolbox?

Hi, Why do you need this? You can directly compute new values for your fitresult: y_new = fitresult(x_new) This retur...

10 days ago | 0

Answered

Errors in objective function

Hi, in addition to the issues that Torsten noted in his comments, note the following errors: * you have X(i) instead of x(...

Errors in objective function

Hi, in addition to the issues that Torsten noted in his comments, note the following errors: * you have X(i) instead of x(...

10 days ago | 1

Answered

Need to solve the equation to find ABC Values

Hi, x and y do not have the same length - if i assume, that y = -2.2026 belongs to x=-0.5 and so on you can determine the val...

Need to solve the equation to find ABC Values

Hi, x and y do not have the same length - if i assume, that y = -2.2026 belongs to x=-0.5 and so on you can determine the val...

11 days ago | 0

| accepted

Answered

Zener Diode model for SimScape

Hi, Simscape Electronics has a zener diode (as subtype of diode) here: <https://de.mathworks.com/help/physmod/elec/ref/dio...

Zener Diode model for SimScape

Hi, Simscape Electronics has a zener diode (as subtype of diode) here: <https://de.mathworks.com/help/physmod/elec/ref/dio...

12 days ago | 0

| accepted

Answered

Different results in MATLAB and Simulink

Hi, your two systems differ in the second number in the numerator of your transfer function by about a factor of 10: <</ma...

Different results in MATLAB and Simulink

Hi, your two systems differ in the second number in the numerator of your transfer function by about a factor of 10: <</ma...

12 days ago | 0

| accepted

Answered

How to evaluate symbolic derivative?

Hi, you are treating the derivate like the function handle - but it is not a function handle. What you do is asking matlab...

How to evaluate symbolic derivative?

Hi, you are treating the derivate like the function handle - but it is not a function handle. What you do is asking matlab...

12 days ago | 0

| accepted

Answered

customised capacitor in simulink

Hi, i know that this is possible. I did not do it by myself until now, but this link could help to find a way to do what you ...

customised capacitor in simulink

Hi, i know that this is possible. I did not do it by myself until now, but this link could help to find a way to do what you ...

14 days ago | 1

| accepted

Answered

Por que se congela mi pc al usar syms

hola, El idioma del foro es el inglés, lo que ayuda a obtener más respuestas. Prueba esto aquí: <https://de.mathworks.com/...

Por que se congela mi pc al usar syms

hola, El idioma del foro es el inglés, lo que ayuda a obtener más respuestas. Prueba esto aquí: <https://de.mathworks.com/...

14 days ago | 0

Answered

How to split a matrix for different plots?

Hi, for your matrix A: >> A = [ 1 23 240;2 22 100;2 44 900;1 33 800] A = 1 23 240 2 2...

How to split a matrix for different plots?

Hi, for your matrix A: >> A = [ 1 23 240;2 22 100;2 44 900;1 33 800] A = 1 23 240 2 2...

14 days ago | 0

| accepted

Answered

Error Using Function Fplot

Hi, this should work - see comment for the issue: T=[-20:20:120] mu=[4 0.38 0.095 0.032 0.015 0.0078 0.0045 0.0032] ...

Error Using Function Fplot

Hi, this should work - see comment for the issue: T=[-20:20:120] mu=[4 0.38 0.095 0.032 0.015 0.0078 0.0045 0.0032] ...

15 days ago | 1

| accepted

Solved

Find the largest value in the 3D matrix

Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

17 days ago

Solved

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

17 days ago