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...

8 years 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....

8 years ago | 1

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...

8 years 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...

8 years ago | 2

| 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...

8 years 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 ...

8 years 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...

8 years ago | 3

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...

8 years 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: ...

8 years 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 ...

8 years 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;...

8 years 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...

8 years 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...

8 years 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(...

8 years 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...

8 years 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...

8 years 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...

8 years 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...

8 years 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 ...

8 years ago | 2

| 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/...

8 years 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...

8 years 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] ...

8 years 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...

8 years 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,...

8 years ago

Answered
Is there any way to get results of curve fitting?
Hi, if you want to calculate the y-values for your 80 x values you can do so: x = [1 2 3 10 20 80] y = your_fitted_mo...

8 years ago | 0

| accepted

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

8 years ago

Solved


Reverse a matrix
Its simple. You have to reverse a given matrix.

8 years ago

Solved


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

8 years ago

Solved


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

8 years ago

Load more