Answered
Round towards specific values in an array
This is one possible solution. If your vectors are very long though, this might be inefficient because it temporarily makes a bi...

15 years ago | 1

Answered
interp3 returning NaN due to machine precision at bounds
You could let it extrapolate outside the region: interp1(dataRange,data,points(8),[],'extrap')

15 years ago | 0

Answered
Optimization Problem
Are you trying to find the x that minimizes that expression as a function of those parameters a and b? If you really want to re...

15 years ago | 0

Answered
Data with NaN
If you wanted to keep a line connecting them: I = ~isnan(x) & ~isnan(y); plot(x(I),y(I))

15 years ago | 3

| accepted

Answered
adapthisteq
The 'numtiles' argument in ADAPTHISTEQ refers to the number of tiles to break the entire image into, and not the actual pixel si...

15 years ago | 0

Answered
Problem in observibility and controlibility function ctrbf,obsvf
Just a suggestion, but when doing symbolic calculations using 's' as a transfer function variable, you might want to explicitly ...

15 years ago | 1

Answered
Problem in observibility and controlibility function ctrbf,obsvf
This difference is just from round-off errors. Notice the second element in Bbar is 1.1102e-016. That is why you get that very...

15 years ago | 1

| accepted

Answered
Inverse function
You can do this with a lookup table block. Simulink -> Lookup Tables -> Lookup Table

15 years ago | 0

Answered
Fit Rigid Body to Points
Interesting problem. I would tackle it in the following way, but I'd be interested to know if someone has a better idea. 1. Re...

15 years ago | 1

Answered
Face a problem when doing keypressfcn for 'ENTER' key on keyboard
Try using 'return' instead of 'enter'

15 years ago | 2

| accepted

Answered
Converting a String to an Array
If what you are really asking is "how do I turn a row vector into a rectangular matrix" then you can use RESHAPE. x = [3 5 ...

15 years ago | 2

| accepted

Answered
skip a load error
You can use a try (catch) block. For example x = 5; try load('asdasdasd.mat') %I can't load this file catch dis...

15 years ago | 4

| accepted

Answered
Symbolic Integration
Both answers are correct. d/dx[ (x+y)^2/2 ] = d/dx[ x^2/2 + x*y + y^2/2 ] = x + y d/dx[ x^2/2 + x*y ] = x + y The a...

15 years ago | 3

| accepted

Answered
standard deviation in matlab
You probably meant to write (400-1) and not (40-1).

15 years ago | 0

| accepted

Answered
Passing array to a function
Whatever Freq is when you exit the function getFreq, it is not of a size compatible with the index vector x. For example, th...

15 years ago | 3

Answered
Why are strings in a cellarray not interpreted as strings?
mystrings(1) returns a cell array. mystrings{1} returns the actual contents of the cell array (in this case a string). So ...

15 years ago | 0

| accepted