Answered
Optimal routing for building feeders in the form of a radial network
You probably need to use tools from graph theory. And there are a nice set of such tools in MATLAB. help graph help minspantre...

9 days ago | 0

Answered
dize ifadesi matlab'da yaz─▒lamaz
Sure it does. S = "Hellow World" However, it is likely that you have an older release of MATLAB, which may not allow the use o...

9 days ago | 0

Answered
MATLAB error using fzero function
You cannot use fzero on a vector. A vector of elements is NOT a function. It is just a list of numbers. And while you may think ...

9 days ago | 0

Answered
Use of fmincon with objective function as m-file
Easy enough. The simple way, assuming all of the variables: {O_plus,O_minus,L_a,L_c,I_app,t} are defined in your workspace, is t...

9 days ago | 1

| accepted

Answered
Finding the maximum value in a single
The max function did not work? Why not? Surely you tried it? S = rand([1,128,3],'single') Smax = max(S,[],2) If you don't lik...

10 days ago | 0

| accepted

Answered
how can I write this in a compact form? can anyone suggest a single line code for it
At its heart, this is just a basic circulant matrix. So use a tool that will do that. I posted such a tool on the file exchange....

10 days ago | 1

| accepted

Answered
I want a graphical way to select/deselect points from a curve.
I posted this code on the file exchange many years ago https://www.mathworks.com/matlabcentral/fileexchange/13857-graphical-dat...

11 days ago | 0

Answered
Persistent variables when passing a matrix through a function
Yes, there is. By passing the elements of x in sequentially to myfunction. But then, you already learned that. Or, since myfunc...

11 days ago | 0

Answered
2D-surface in 3d space from points without relationship
This is less than a simple problem if you give no information at all about the surface in question. If it is a single valued thi...

11 days ago | 0

| accepted

Answered
How can I use the Genetic Algorithm (GA) to minimize a cost function of two variables C(T,K) where T is a real an K an integer.
Trivial. Write your function as an objective function. I won't do that for you, but just start at the beginning and write it. ...

12 days ago | 2

| accepted

Answered
how to solve the following equation by using Matlab
Your problem is: f = @(z) (0.10-0.3i)*z.^(-1) + (0.2121 - 0.0008i)*z.^(-2) +(0.9+0.001i)*z.^(-3); Please don't use curly brace...

12 days ago | 0

Answered
Plot sinusoid equation of x(t)
Do not define a variable with the names: sqrt, exp, real, imag, plot If you do, then what do you think will happen when you the...

13 days ago | 0

Answered
Yapay sinir aglari ile satis tahmini problemi cozdugumde R2 degerinin negatif cikmasi ne ifade ediyor. R2 degeri hangi aralikta olmalidir?
Let me give an example. x = rand(100,1); y = 5 - 3*x + randn(size(x)); plot(x,y,'o') First, fit a LINEAR polynomial model t...

13 days ago | 0

Answered
Can we get functions from the curve fitting toolbox?
New users of splines ask this question so many times. I can understand the question. But a spline fit is not a simple thing wher...

13 days ago | 1

Answered
matlabFunction: Why the extra ".0" and why only sometimes?
Does it really, really, really matter? Actually, there is a (subtle) reason for the 2.0. You should recognize there is some pot...

14 days ago | 1

| accepted

Answered
My code does does not go through the the if section
Rule # 1: NEVER test for exact equality of floating point numbers. (At least unless you fully, completely absolutely understand ...

14 days ago | 0

| accepted

Answered
Linearize an exponential curve for feeding it in GAMS
What do you mean by linearizing a nonlinear curve? I can think of many ways to do that. But no matter what, a nonlinear function...

14 days ago | 0

Answered
How to find fit for function with exponential and oscillation term?
Why is it not working? First, you NEED good startign values. ALWAYS. Whenever you have exponential models and trig models. What ...

14 days ago | 0

Answered
Missing function from Computer Vision Toolbox
I would first look at the release notes for R2022b, here: https://www.mathworks.com/help/driving/release-notes.html But, perha...

14 days ago | 1

| accepted

Answered
ans = Empty sym: 0-by-1 error in solving equation
So many times I see this mistake made. I can understand where it comes from. But it gets MATLAB (actually solve) confused. When...

14 days ago | 0

Answered
Faster than pdist for cityblock on integers?
This issue is surely not a problem with the distance computation as anything complicated, as much as it would be generating and ...

15 days ago | 1

| accepted

Answered
Vector calculation of HermiteH Polynomials
First, the two sets of polynomials are effectively the same thing, but for a transformation. As you said, the two are just ortho...

15 days ago | 0

| accepted

Answered
integration of equation using gui
I can't execute this code in online MATLAB. So we can just look at what happens inside the function caled integration. First, i...

15 days ago | 1

| accepted

Answered
how to create a polynomial interpolation of two variables
Sorry, but this is a common mistake made by people. You really have only ONE variable there, since x and y are linearly related...

16 days ago | 0

Answered
Projection problem as a for loop
Your main problem is that the vector Ca is not composed of double precision numbers. That causes the code to fial, because the f...

16 days ago | 0

Answered
how to work with a variable as a function of time?
Why MATLAB shows a partial derivative there, and not an ordinary derivative? syms theta(t) dTdt = diff(theta,t) Technically, ...

18 days ago | 0

Answered
How to Plot a 4D polyhedron
Do you have a 4-dimensional hypermonitor? Perhaps you use a holodeck to do your plots? Oh, wait, you cannot get things like that...

18 days ago | 0

Answered
cos block error (simulink)
Welcome to the wonderful, wacky world of floating point arithmetic. Is the number format long g pi/2 EXACTLY pi/2? cos(pi/...

18 days ago | 0

| accepted

Answered
How can I assign to a variable an interval of numbers.
You cannot just tell MATLAB that a normal variable is any value in some interval. Effectively, this requires interval arithmetic...

18 days ago | 1

Answered
Faster alternative to polyxpoly
Nothing is ever as fast as we want it to be. polyxpoly (part of the mapping toolbox) does a lot of work. And it needs to check f...

18 days ago | 0

Load more