Answered
Print a cell arrays into text file
You want to try and use '%04d' '%10s' to print 4 digit integers, and 10 letter strings, i.e. use a maximum limit, and fixed widt...

12 years ago | 0

Solved


Negation the hard way
Write a function that has the following property: f(f(x)) = -x for any numeric array x. Note that there is no restriction on ...

12 years ago

Answered
problem with control signal
If your signal is in variable *x*, you need to use the transform, y = (x+10)/2 So you can implement this equation easi...

12 years ago | 1

Answered
How can I plot this vector
Hello @Osasu I recomment learing about MATLAB via tutorial, <http://www.mathworks.com/help/matlab/ref/plot.html>. I recommend...

12 years ago | 0

Answered
Using Sum(W) ==1 as a condition in a function
@Andrew on the similar lines as @Image Analyst - I think your return value is not assigned because you don't enter the if-condit...

12 years ago | 0

Answered
Send PuTTY Command Through Matlab Script
AFAIK this is not currently possible in MATLAB, i.e. to have a live terminal session - you need pipes and MATLAB doesn't offer t...

12 years ago | 0

| accepted

Answered
I need to do a Sign Restriction SVAR in Matlab
@Gareth MATLAB has concepts of script and a function. You cannot mix both. If you start a M-file with a MATLAB command that i...

12 years ago | 0

| accepted

Answered
Is it possible to download and process images Asynchronously?
Yes. Try MATLAB timer object. <http://www.mathworks.com/help/matlab/ref/timer.html?searchHighlight=timer MATLAB timer>

12 years ago | 1

| accepted

Answered
how to combine values into one cell in a matrix within a matrix
If you are on MATLAB v13a or later you can try size(s) %put your 11x2 cell here cellJoinedAsString = strjoin(s)

12 years ago | 0

Answered
Find distance between to elements of a "circular" vector
Assuming your list is unique you can get the linear positions of two numbers as, p1 = find( v == n1 ) p2 = find( v == n2...

12 years ago | 1

Answered
How to run two for loops
To do it the way you want, not my preference, you should write a double loop, and compute the index into the cell array *h* F...

12 years ago | 1

| accepted

Answered
Find locations of repeated values?
Guessing from reading the code, and the comments in the code itself, you are looking for the variable, *startindex* [starti...

12 years ago | 0

Answered
eigenvalues - determining the three major eigenvalues from a matrix
Take a look at the >> doc eigs >> doc eig as @Jan Simon has suggested. For example with <http://www.mathworks.com/he...

12 years ago | 0

| accepted

Answered
search and delete text lines when certain strings are missing
Have you tried *regexp* ? <http://www.mathworks.com/help/matlab/ref/regexp.html?searchHighlight=regexp regexp> My recommenda...

12 years ago | 0

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...

12 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...

12 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() ...

12 years ago | 0

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

12 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...

12 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. ...

12 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...

12 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...

12 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...

12 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...

12 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 ...

12 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...

12 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 ...

12 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...

12 years ago | 0

Load more