Answered
Numerical Garbage value in Matrix
help real Better yet, compare the results of abs(real(A)) to abs(imag(A)). As long as the imaginary part is small, just del...

8 years ago | 1

Answered
How to force a exponential fit to go through a preestablish point (x,y)?
'StartPoint' refers to the initial parameter guess for the model, since this is an optimization problem. Not a point the curve m...

8 years ago | 2

Answered
How likely is it that I can use simple linear regression to predict?
No real world data truly follows a perfectly linear model. Even where there is an essentially linear domain, there are always li...

8 years ago | 0

Answered
Order of logical operators
You need to recognize how MATLAB evaluates a logical expression. Many people use that shorthand, to indicate two coupled compari...

8 years ago | 1

| accepted

Answered
is it possible that answers can be accepted?
Being an MVP does not give you the privilege to doubly accept an answer. Read the help for Answers. It tells you what privileges...

8 years ago | 1

| accepted

Answered
Plotting the area defin
You know how to use meshgrid! In fact, I know that, because you used it in your other question. So it you want to plot someth...

8 years ago | 1

Answered
Start point power law fit
I'm not positive what tools you are using for the fit. I will assume the curve fitting toolbox. Almost all optimizers (nonlin...

8 years ago | 0

Answered
Looking for some tips on a Simulation Project!
Is there a better way? Not really. In fact, your plan is actually a good one, and arguably the best approach. The true art will ...

8 years ago | 1

| accepted

Answered
assemble global stiffness matrix
K = zeros(10,10); k = [1 -1; -1 1]; for n = 1:9; rind = n + [0 1]; cind = rind; K(rind, cind) = K(rind, c...

8 years ago | 0

| accepted

Answered
Create a polar function from a polar regression
Your question is slightly ambiguous. Are you looking to find a model of the form z=f(r,theta)? Or do you want some model that li...

8 years ago | 0

Answered
What are Contour Levels
A contour of the function z(x,y) is a set of points in the (x,y) plane, such that z(x,y) is fixed at some constant value. That c...

8 years ago | 0

Answered
Operands to the || and && operators must be convertible to logical scalar values
LEARN TO USE THE DEBUGGER!!!!!!!!! I did this: dbstop if error Next, I ran your code. Well, I tried to run it. f...

8 years ago | 3

| accepted

Answered
Exponential fit using Linear Regression
Write down the model you want to use. DO IT! You can't solve this unless you understand & think about what you are doing. That r...

8 years ago | 1

| accepted

Answered
How to calculate the ratio of two primes in a given set of primes?
As long as the set is sorted, you never need to worry about the ratio being greater than than 1. How do you compute a base 3 ...

8 years ago | 1

Answered
gamma function for N>100
No. You will not make it work for large values, when they exceed the limits of gamma itself. Your code is not better than what y...

8 years ago | 2

Answered
find rows of Zeros in matrix
Time to learn MATLAB. How do you find that something is zero? A == 0 That returns 1 where an element of A is zero. EXACT...

8 years ago | 3

Answered
If statement with many logical or.
Your problem is EXACTLY in that you are trying to compare floating point numbers, for exact equality. This is something you shou...

8 years ago | 2

Answered
Function not defined but it is in fact defined
Did you actually save it as an m-file? Is it saved to your search path? NOT saved in one of the MATLAB supplied directories? ...

8 years ago | 0

Answered
Volume of irregular shape
Not sure I see the problem. You apparently have cross sections in say x and y, presumably, at various values for z. That means y...

8 years ago | 0

| accepted

Answered
How to make an exponential function taking as input a vector?
inp = 3; syms n n.^(0:inp-1) ans = [ 1, n, n^2]

8 years ago | 0

| accepted

Answered
How can I do least square problem to get certain area?
Compute the area of the polygon. I'll call it A. polyarea should suffice. Recognize that area scales with the square of the u...

8 years ago | 0

Answered
How to underline an undefined function or variable
I believe that capability would not exist, because it is easy enough to create a variable or function name on the fly. It would ...

8 years ago | 2

| accepted

Answered
How to find point(s) of intersection between two scatter surfaces and the zero plane?
Hint: contour 1. That is, use contour to identify the level surface at 0 for each surface. The result will be a set of piecew...

8 years ago | 1

| accepted

Answered
How can I plot a line of one data point (x,y) using linear interpolation
Linear interpolation is meaningless with one point. Said another way, there are infinitely many lines that pass through one poin...

8 years ago | 0

| accepted

Answered
How can I fit the data if I know the relationship of x and y, but don't have expression form of y=.....
Use polyfit. Seriously. Your model is a linear one in those parameters. Here is your model: ((x+5.637)^(y-2))/1000 = a + b*...

8 years ago | 0

| accepted

Answered
What is the simplest way to extract lengths of NaN sequences from a vector?
Given sequences in a vector of NaNs, you find the location of the start, then find the end. the length is given by the differenc...

8 years ago | 1

| accepted

Answered
Conversion of 100 jpg images to PGM
Use a loop? Surely you can get the directory contents, so the names of all images in a directory, using a tool like dir. Now jus...

8 years ago | 0

Answered
How to divide anonymous functions
But what does this do? @(x) f(x)./df(x)

8 years ago | 0

| accepted

Answered
Taylor Series for sine function
(Note: you might decide to read how I coded trig functions in my HPF toolbox. But that would be wild overkill for basic homework...

8 years ago | 0

| accepted

Load more