Beantwortet
nlinfit - iteration limit exceeded error
Probably your termination tolerance is too small for the data you're throwing at it. Play with the options 'MaxIter', 'TolFun...

mehr als 14 Jahre vor | 0

Beantwortet
detect the longest edge and calculate the slope
What about using the Hough transform to detect lines in your edge image? You could search the resulting Hough-space for lines w...

mehr als 14 Jahre vor | 0

Beantwortet
How to write a loop for adding number
If you think about what you're doing, it's just a cumulative sum. Put all your variables into a vector: vec = [a b c d ....

mehr als 14 Jahre vor | 0

Beantwortet
adding data to a text file
I remember answering an almost identical question from you the other day. It used the fopen() with the open-mode 'w' to overwri...

mehr als 14 Jahre vor | 1

Beantwortet
loop-free numeric array indexing when numeric array inside cell array
You can use *cellfun* for this if you combine the _C_ and _ind_ cell arrays: _ie_ chuck the _ind_ array as a new column in _C_....

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
trouble for importing a data file
Using *textread* is fine here. But you need to include as many fields in your format string as you expect to see in the file,...

mehr als 14 Jahre vor | 0

Beantwortet
Multithreading with mex functions
I'm not sure if I've interpreted your question correctly, but I think your main problem is working out how to get data back to M...

mehr als 14 Jahre vor | 2

| akzeptiert

Beantwortet
Best way to structure code with large matrices shared between multiple functions
MatLab is pretty clever about when to copy and when to pass by reference. Generally, a matrix passed as a parameter will only b...

mehr als 14 Jahre vor | 0

Beantwortet
browse for an excel file and save the data as a matrix
Use the function *uigetfile* to browse for a filename, then pass that name to *xlsread*.

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
importdata() question
Are you sure? If you look closely, you'll see the display is saying '1.0e+003 *'. That means your numbers are correct, but are...

mehr als 14 Jahre vor | 0

Beantwortet
Extract part of the text file
I would do it as follows: First, slurp the entire file into a cell array. fileID = fopen('input.txt', 'r'); lines =...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
overwrite a text file with other data
Let's say your value is in the variable called v: v = [3 6 9]; You can use _save_ which will output lots of extra decima...

mehr als 14 Jahre vor | 0

Beantwortet
error in reading frames
You're constructing one filename out of lots of them. You're also assuming that the files are listed in order. You need to get...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Kinect(Microsoft SDK) Skeleton (recorded ) Data from pixel to 3d World Coordinates
Are you saying you acquired the same gesture data from the same unit but in different formats? Are your time stamps the same? ...

mehr als 14 Jahre vor | 0

Beantwortet
Connecting matlab and visual studio
If this is to be deployed on a server somewhere, it might get a little fiddly. However, if you simply have MatLab and VS runn...

mehr als 14 Jahre vor | 1

| akzeptiert

Beantwortet
lsqcurve fit precision problem?
Probably, like you say, related to scale. You can use _optimset_ to adjust the solver: > opts = optimset('lsqcurvefit');...

mehr als 14 Jahre vor | 0

Beantwortet
random number from a data set with a specified error
This question is open to interpretation. What I _think_ you have is a dataset X with known standard deviations S (a vector co...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Plane in 3D space
Without really trying to look at your maths, let me suggest that you will have less issues if you treat your 3D objects in a sta...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Function to format number as currency?
Hehe, everyone's got a different function. I wrote a pretty inefficient tail-recursive solution, which might not be the "MatLab...

mehr als 14 Jahre vor | 0

Beantwortet
Correlation values of various time periods
It appears you just want an index that slices the data in intervals: N = length(Data.L1); idx1hr = 1:N; idx2hr = 1:...

mehr als 14 Jahre vor | 0

Beantwortet
find a string element in a structure matrix
Direct comparison operators (==, etc) don't work with strings. You need to use _strcmp_ or _strcmpi_ (which ignores case). ...

mehr als 14 Jahre vor | 1

Beantwortet
How can I format a percent using 2 digits after the decimal
If you want to do it without using strings: round(x * 100) / 100; One reason you might want to do that is if you have a ...

mehr als 14 Jahre vor | 3

Beantwortet
Constrained Polynomial Regression
So you mean that you want to constrain a cubic polynomial regression such that the x^2 term is zero? For this I would use _fs...

mehr als 14 Jahre vor | 2

| akzeptiert

Beantwortet
Extracting a block from a big array
I like using _find_ for these kinds of problems. To find all the starting indices of your blocks, you can go: idxStart = f...

mehr als 14 Jahre vor | 0

Beantwortet
Variable name not coming properly in the generated code
Does it happen when you have other numeric suffices on your variable names? _ie_ if you have the variable 'abc_f31' or 'abc_f33...

mehr als 14 Jahre vor | 0

Beantwortet
converting decimal year into julian day or a [Y,M,D] vector??
That's not the correct usage of datevec and datestr. The first thing you need to do is work out how many days are in that yea...

mehr als 14 Jahre vor | 3

| akzeptiert

Beantwortet
Move subplot title and create colored line beside it.
I don't know how to answer your 'line' question, but to set the title position do this: h = get(gca, 'Title'); set(h, 'U...

mehr als 14 Jahre vor | 1

Beantwortet
saving a value and reseting other variables in a loop
I think you're asking two questions: a) Why is the indexing broken? b) What is a better way to do this? I'll ask you my...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
please i need to know How connect sql with matlab???
WampServer uses MySQL, I believe. You need to install the MySQL ODBC driver: <http://dev.mysql.com/downloads/connector/odbc/...

mehr als 14 Jahre vor | 2

| akzeptiert

Beantwortet
Making change with coins, problem (greedy algorithm)
Have already voted on Srinivas' correct answer to your question, but this is for your interest and study: function [coins] ...

mehr als 14 Jahre vor | 2

Mehr laden