Answered
problems with a regex
A simple solution to parse the string with rule "is a " and ( " - touches edge" OR " - 3D" ) is to use sequential rege...

11 years ago | 0

Answered
Compiled MATLAB with TORQUE
You may alternatively consider writing a "monitor" thread or app using the MATLAB timer() functionality. See <http://www.math...

11 years ago | 0

Answered
problem in parsing data
You want to cast your data to right type. Default numeric type in MATLAB in double. You may want to use uint8() on your fread() ...

11 years ago | 0

Answered
array of interpolant created with csape
Looks like MATLAB function csape needs a first argument as a function handle!

11 years ago | 0

Answered
how to import data from multiple folders in matlab?
I don't understand your question. You seem to already have a working solution. filenames = {'path/1/fil1', ... } num...

11 years ago | 0

Answered
how to create cell array for time format elements in matlab
Your error message means that you are indexing the cell-array to get a subset of its elements as another cell-array. i.e. ...

11 years ago | 1

| accepted

Answered
How to do time delay in PN sequence
If you understand that _p(n-k)_ in DSP terms is nothing but the same signal _p_ but time-shifted by the amount _k_ then it resol...

11 years ago | 0

| accepted

Answered
Instantiating Object Arrays with superclass call
Will you be posting *the exact error message?* That would help solve your problem. I suspect you are running into problems wi...

11 years ago | 0

Answered
deploytool batch file issue
@Tobyn you probably want to invoke MATLAB from shell to do this right. I understand your code is executed on the windows comman...

11 years ago | 0

Answered
How do I make MATLAB list the various sequences possible for a specific purpose?
@Samyukta you seem to need a 'generative grammar'. You can do this via mutually recursive functions. You should type the followi...

11 years ago | 0

Answered
How can I save and load customized (background-)colors of blocks for later simulink sessions?
>> clr = get_param(gcb,'BackgroundColor','Orange') 'white' >> set_param(gcb,'BackgroundColor','Orange') Whole list ...

11 years ago | 1

| accepted

Answered
Access elements/fields from a struct
In addition to the excellent answers posted by @Iain, and @Tom, you may also want to look at MATLAB support for JSON from the Fi...

11 years ago | 0

Answered
PARFOR loop is too slow
Key to using parfor must be the independence of each iteration; i.e. you cannot write variable updates like, a = a + 1 ...

11 years ago | 0

Answered
Data changing when I move it from one struct to another
I find your claim surprising, i.e. copying MATLAB data array from one variable to another, changes dimensions. This is very unli...

11 years ago | 0

Answered
Explanation of the matlab code
Your code calculates a filter kernel. I haven't run the code, but, it seems to me a kind of Gaussian filter, with some normaliza...

11 years ago | 0

| accepted

Answered
Identifying Keywords in Strings strfind
I have two comments, while in general agreement with @Marc; 1. You can build strings out of sentences in first pass 2. Use c...

11 years ago | 0

Answered
publish a document with some pictures and no code
Have you looked at 'publish' command where some additional markup on your M-files can convert them into spiffy looking HTML, RTF...

11 years ago | 0

Answered
Import text file with header
z=textread('filename.dat','%s','delimiter','\n') z=z(4:end) q=regexp(z,',','split') data = reshape(str2double([q{:}])...

12 years ago | 0

Answered
How to function a sum
You can try something like, function val = Req( fhandle, arg, N ) val = 1; for itr = N:-1:1 %build from sma...

12 years ago | 0

Answered
Graphing the result of a regression in Matlab
You are missing all the '*' product signs between your polynomial coefficients and the variable; wrong MATLAB syntax doesn't get...

12 years ago | 0

Answered
Trying to code two angular acceleration equations and angles
To give you a hint, 1/0 = Inf, 0/0 = NaN. So you need to avoid doing these things in your code. Special case the situations w...

12 years ago | 0

Answered
How do I call a plot from a function in a GUI?
When using the GUI, you should create a new figure() and save the handle to it. h = figure(); plot(h, x_axis, y_axis, la...

12 years ago | 0

Answered
read binary file into matrix
Pay attention to the 'source' and 'precision' options to fread(). >> doc fread is your friend Example from, <http://www...

12 years ago | 0

Answered
How to open a file and store it in cell array?
See documentation pages for, fopen, fgetl, fread, fscanf, fclose >> doc fgetl Function fgetl, fread and fscanf return ...

12 years ago | 0

| accepted

Answered
Random Integers from a preconstructed non uniform distribution
A well known approach is called the 'Box Mueller' method. You generate a uniform random variable [0,1] to index into the cumulat...

12 years ago | 0

| accepted

Answered
Twist on the 'classic' tank filling / emptying problem
You can see the standard ODE solutions in Simulink, described among other places, on Mathworks blogs <http://blogs.mathworks.com...

12 years ago | 0

Answered
how do i analyze measurement data .txt file
Hello Kingsley, You have a very broad based question; MATLAB is the right tool for your task. Take a look at the functions f...

12 years ago | 0

Answered
Is it possible to write several statements into an anonymous function?
Great answers everyone; the best solution for this problem might still be 'reshape' based answer by Walter, Daniel and Matt - ea...

12 years ago | 0

Answered
Rotate Normal Around Tangent
Paul, You need to find the points of a 2D rotation transform using the equations, for example affine transformation <http://en....

12 years ago | 0

Load more