Answered
Two vectors and one regular value - is it possible to create a 3D plot with this data?
There will be no third dimension, so I'm not at all sure what you think you will be seeing. However, yes, assuming the two ve...

10 years ago | 0

Answered
Cell array without empty variables
Use cellfun with isempty to identify those cells that are empty. Then just delete those elements like you would delete elements ...

10 years ago | 0

Answered
Help ! two nonlinear equations
Actually, solve has no problems, returning only a set of 6 solutions that all lie in the interval [-pi,pi]. Of course they will ...

10 years ago | 2

| accepted

Answered
How do i return the largest Fibonacci number that is less than or equal to x?
You misunderstand Fibonacci numbers, at least in terms of the recursion. The basic Fibonacci recursion, i.e., f(n) = f(n...

10 years ago | 1

| accepted

Answered
How can I create ideal teams using vectors in Matlab?
Looked back in here, surprised that nobody answered. Oh well. here goes... I'll assume that teams are split into two disjoint...

10 years ago | 0

Answered
how can i write a programs which prints the following pattern, but by only using nested loop
A = [' * ';... ' *** ';... ' ***** ';... ' *******';... ' ***** ';... ' *** ';... ' *...

10 years ago | 0

Answered
Array of 1 and 0 to decimal
B = bin2dec(char(A + '0')) B = 147 15 170

10 years ago | 0

| accepted

Answered
solve system of nonlinear equations
Why do you think that something is wrong? You got a perfectly reasonable result. Did you expect an analytical solution? Not all ...

10 years ago | 0

Answered
Fitting implicit function with data
Sorry, but it seems a foolish goal to fit that curve with your function. There are far easier ways to accomplish a curve fit. ...

10 years ago | 0

| accepted

Answered
Finding surface height at x,y coordinates
You have already used griddata! It looks like you have found a code snippet, but have no clue as to what it does or why it works...

10 years ago | 0

Answered
How to reverse this normalization?
You cannot do so. Sorry, but the necessary information (i.e., the linear transformation used) was lost in the normalization, not...

10 years ago | 0

Answered
program to find zero value of the function
Not like this is hard. Make a loop over k. Generate the roots for each k. Then sort them, taking the middle one in each case....

10 years ago | 0

Answered
What is the problem in below code??
It runs for me, so apparently you are running different code there, probably on a different variable x, than what you have told ...

10 years ago | 0

Answered
How i can solve the "Non-Linear Equation" with "TWO Unknown variables" ?
By the way, these functions are rather nasty looking, full of discontinuities and singularities. Newton-Raphson will fail rather...

10 years ago | 0

Answered
if i have random matrices how to find a specific matrix?
Why not just save the current matrix, IF your computation is better than the previous best solution? This requires only an if st...

10 years ago | 1

Answered
Why is it taking so long to execute program?
What do you think MATAB must do when you do something like this: tic clear n n(1) = 1; for i = 1:10000000 n(i...

10 years ago | 0

| accepted

Answered
matlab code to transform linear systems to strictly diagonally dominant matrix
I'm sorry, but this is not possible to do. In fact, you can prove the impossibility, by a simple counterexample. Let the matr...

10 years ago | 1

| accepted

Answered
Why griddatan return NaN values when interpolating 3D and higher input data?
You have 4 points in three dimensions. But really, they do not live in three dimensions. They all lie in EXACTLY one plane. You ...

10 years ago | 1

Answered
How to solve a linear equation with maximum equation?
Why would you use symbolic tools to solve this problem? Sorry, but that is a bit silly, using a Mack truck to carry a pea to Bos...

10 years ago | 0

Answered
Why does vpasolve fail when I try to use sind() in my equation to be solved numerically?
Is it really that difficult to write this sin(D*pi/180) instead of sind(D)? Yes, it would be nice if the symbolic TB rec...

10 years ago | 0

Answered
License for MATLAB with Optimization_Toolbox
You have a limited number of licenses for a group of people. When this is done, then as you use a toolbox, MATLAB checks out a l...

10 years ago | 0

Answered
Finding the standard deviation of a matrix
You are getting a different answer because you are not even doing what you said you wanted to do. Should you be surprised? Your ...

10 years ago | 2

Answered
is there any command which uses gradient descent to find a minima ?
Why do you think you need explicitly gradient descent? Steepest descent (i.e., directly following the gradient downhill) is ofte...

10 years ago | 0

Answered
How can I fit a curve in of an 3/4 circle
You have a relationship that does not represent a single valued function, y(x). The simple answer is to use cscvn to do the f...

10 years ago | 0

| accepted

Answered
Determine the cubic spline from four points without using built-in matlab functions?
That is sufficient information, thanks. So let me see if I can help. (Best of course, is to not write your own spline code, but ...

10 years ago | 2

Answered
Problems with minimizing a function
First of all, do not do a load every time the function is called. This is very inefficient, and will soon cause you to ask how t...

10 years ago | 0

| accepted

Answered
Solving Time-independent 2D Schrodinger equation with finite difference method
Just use the tool designed to solve your problem. help eigs

10 years ago | 0

Answered
Area in a "dip" in curve of discreet data?
It is not at all obvious what is your problem. Yes, you can integrate a spline function. So you could use spline on the point...

10 years ago | 0

Answered
lsqlin: C is M-by-N. Is M=N possible?
Why not test it yourself? The simplest way to answer a question like this (and the FASTEST way) is a simple test when you are no...

10 years ago | 0

| accepted

Answered
Can anyone help me figure out where the error is? It says "undefined function or variable NormF" when I run it but I can't figure it out.
LEARN TO USE THE DEBUGGER!!!!!!! Actually here, the answer is simple enough that it is not necessary, iF you think about the ...

10 years ago | 0

Load more