Implementing filter design using LabVIEW - filtering

I am currently starting to learn LabVIEW for a project. It seems very new (and alien) to me.
I need to do filter design using LabVIEW. I have the filter in the form of :
y(n) = y(n-1)+y(n-2)..... + 1/23[x(n-1)+.......]
Given an equation of that kind, how would I implement the filter? I have tried options like Advanced Signal Processing Toolkit and so on; but couldn't find the necessary block.
Kindly reply at the earliest. Any suggestions are welcome as well.

Recently I had to implement a similar filter.
My attempt:
I do not know if this is the best way to implement such a filter however it works just fine.

Related

Can you feed OR-tools solver external data inbetween different solutions it finds?

I'm trying to solve a complex variant of a min-SAT problem. So far in the process I have two subproblems, both giving solution values that need to be considered in the objective function. However, only one of the two problems do I solve with the OR-tools cp_model module. The other is solved by an external algorithm. Now, ideally I would do the following:
cp-solver findes a solution to the first subproblem,
pause the solver,
solve the second subproblem with an external algorithm, taking as argument the solution found by the cp-solver,
feed the result of the external algorithm back to the cp-solver,
cp-solver now considers as the objective value the sum of the solution it itself found to first subproblem and the solution that was found by the external algorithm,
cp-solver goes to the next iteration and repeats steps 1-6 for a new assignment
So my question is: is there a functionality for Google OR-tools that lets me do something like steps 1-6 where the solver runs in cooperation with external algorithms and is fed values accordingly? I'm new to using this module so I'm unaware of what terms I could search for on Google to find what I need. Thanks a lot my friends. Best regards, 30centimeter.
In the cp-sat solver, solve() is stateless and a black box.
The only thing you can do is modify the model and resolve.

Galerkin projection method

Does anyone have a working and optimal implementation of the Galerkin projection method in Matlab? I tried to implement the method itself, but for some reason, the result didn't converge with the analytical solution.
I've found the realisation of the method on the official Mathworks' web site But it does not works. Does anybody know how to run this code correctly?
I am not sure whether this is what you want, but there are two excellent books on discontinuous Galerkin methods and their implementations in general:
http://www.springer.com/mathematics/computational+science+%26+engineering/book/978-0-387-72065-4
http://books.google.de/books/about/Implementing_Spectral_Methods_for_Partia.html?id=fZyqWPNjx4AC
Both books include code snippets - the first one (yellow book by Hesthaven/Warburton) uses actual Matlab code, the second one only pseudo code.

About to begin learning MATLAB on my own

so essentially I have the task to learn matlab decently well in the next few weeks, and I want to really be able to impress the people i'm learning it for, so if you guys have advice, I would greatly appreciate it.
What I'm dealing with Throughout the course of my job I will be dealing largely in two areas.
Formatting and importing data from excel
Interpreting the data in a meaningful way.
I realize the second category is extremely broad, but essentially i'm working with arrays of pricing information to set some standard price for a commodity, so the analysis that I will be doing will be less computationally heavy and will focus more on error getting the data in correctly and accurately and making sure all of the functions that I want to perform are executed correctly. Very basic stuff.
So here's what I'm looking for:
What are the most important topics so that I can import data from excel into matlab perfectly?
What should I study just to get basic functions down that will be applied to entire matrices/arrays?
What should I study prior to studying anything else to get a firm foundation in the subject? (So I don't make stupid syntax errors, etc.)?
Your help is greatly appreciated :)
The first two things you'll want to learn about are (1) the Matlab GUI and (2) the basics of Matlab syntax. A quick visit to the Getting Started section of the Matlab documentation will do you wonders. It should take you less than a day to get through the basics. Do note that the Matlab documentation is generally excellent, and you should use it often.
Beyond that, there are a number of questions here about importing Excel into Matlab (importing from excel, exporting to excel), and there's some excellent docs on the Mathworks site as well (xlsread, xlswrite). Read them and become familiar with the details and common problems. Good luck!
Since you will be using excel it is likely the data you import could come out in cell format. Look into the differences between indexing using matrices and cells. Also, learn early on the difference between [operator] and .[operator] for vector calculations. The second one is element-wise and will most likely solve a lot of issues you'll come across if your records are meant to only relate to one row/column of data
Perhaps you have gained the MATLAB skills you need now, but hopefully this will help someone following the same path later.
The Math Works (developers of MATLAB) run a site called MATLAB Cody.
This site offers a range of problems and a web based MATLAB interpreter so you can test your solutions. When you have a correct solution, you can compare with other solutions to the same problem. Then you can look up the functions others have used in the online MATLAB documentation for more understanding.
The problems focus on regular expressions and cell manipulation which will be very relevant to importing and manipulating Excel data.

Estimating effort to port code from Matlab to Octave

I just read a fascinating paper: http://www.psy.cmu.edu/~ckemp/Papers/kempt08.pdf
In my opinion it takes the whole area of machine learning to a completely new level because it flexibly discovers the structure of data (and doesn't only try to find a best fit for an existing structure).
The code is also available: http://www.psy.cmu.edu/~ckemp/code/formdiscovery.html
I tried to do a few experiments of my own - but unfortunately I don't possess Matlab. I tried it with Octave but it only produced all kinds of error messages, which I don't understand (I am no expert on these programs).
Could anybody perhaps have a quick look if these problems can be solved easily (or at all)? Perhaps the solution will be an easy one (this is my hope after all).
This would really be a big help! I am very much looking forward to trying a few data sets of my own.
I didn't look into the source code, but if you are going to convert it, these links might help:
Porting programs from Matlab to Octave
Differences between Octave and MATLAB
I was recently looking for an answer to the same question and found this old post. Just to add my two cents for anyone else looking...
There is an Octave library called Missing Function Library that "Finds functions that are in Matlab but not in Octave". Also, there are a bunch of great packages (read "Toolboxes") for Octave as well on SourceForge. Hope this helps!

simulate ARMA model with specific order and parameters value

What is the matlab function to simulate ARMA model and coda matlab function
(coda:convergence diagnostic and data analysis)
A friendly suggestion: even normally helpful people will probably get annoyed if you ask too many similar questions without indication that you're willing or able to do some work yourself. A better question might start with something like: "I tried x but it didn't work for reason y.."
As before, the Systems Identification Toolbox may have what you need.