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

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

mer än 9 år 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...

Compiled MATLAB with TORQUE

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

mer än 9 år 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() ...

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

mer än 9 år ago | 0

Answered

array of interpolant created with csape

Looks like MATLAB function csape needs a first argument as a function handle!

array of interpolant created with csape

Looks like MATLAB function csape needs a first argument as a function handle!

mer än 9 år ago | 0

Answered

hello, i have a question regarding extrapolation of data in MATLAB... i have 52 years of inflow data and with reference to it i have only 28 years of silt data....so can i extrapolate my silt data upto 52 years...is there any command or code...

Have you looked at interp1 , fnxtr and friends ? * <http://www.mathworks.com/help/matlab/ref/interp1.html> * <http://www.mat...

hello, i have a question regarding extrapolation of data in MATLAB... i have 52 years of inflow data and with reference to it i have only 28 years of silt data....so can i extrapolate my silt data upto 52 years...is there any command or code...

Have you looked at interp1 , fnxtr and friends ? * <http://www.mathworks.com/help/matlab/ref/interp1.html> * <http://www.mat...

mer än 9 år 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...

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

mer än 9 år 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. ...

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

mer än 9 år 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...

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

mer än 9 år 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...

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

mer än 9 år 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...

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

mer än 9 år 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...

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

mer än 9 år 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 ...

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

mer än 9 år 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...

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

mer än 9 år 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 ...

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

mer än 9 år 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...

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

mer än 9 år 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...

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

mer än 9 år 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...

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

mer än 9 år 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...

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

nästan 10 år 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{:}])...

Import text file with header

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

nästan 10 år 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...

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

nästan 10 år 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...

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

ungefär 10 år 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...

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

ungefär 10 år 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...

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

ungefär 10 år 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...

read binary file into matrix

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

ungefär 10 år 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 ...

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

ungefär 10 år 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...

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

ungefär 10 år 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...

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

ungefär 10 år 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...

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

ungefär 10 år 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...

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

mer än 10 år 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....

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

mer än 10 år ago | 0