So sánh giữa matlab và labview năm 2024

You'll probably need to test this out for yourself for your own particular class of problems and dataset sizes.

I've only dabbled with Matlab a little over the last few years so my impressions may be a bit stale, but here goes anyway:

1. LabVIEW with NI cards is far and away a nicer environment for pulling real-life signals into program data and pushing data out as real-world signals.

2. Some built-in Matlab functions are impressively fast on really big datasets. My impression was that Matlab seemed more likely to be closer to best-in-class implementations of algorithms. It stands to reason since Matlab is pretty much all about the number-crunching. LabVIEW has improved noticeably over the years though and may not lag much, if any, these days.

When I first started using LabVIEW, I would typically collect a big dataset, throw it onto a Zip disk [100 MB oversized floppy circa 1997], then do all the post-processing at my desk in Matlab. In the last few years, the only time I did something like that was because I needed to deliver the Matlab processing script to a colleague who had Matlab but not LabVIEW. Without doing side-by-side comparisons, I simply don't find the speed of LabVIEW data processing to be any kind of bottleneck.

3. The speed of a custom Matlab script is highly variable. Code that can be "vectorized" can run almost magically fast. Code that must loop a million iterations through the script interpreter can be dog slow, to the tune of 2-3+ orders of magnitude. Labview algorithms will always run as compiled code which would put them much nearer to the "vectorized" Matlab code than the interpreted script. Could even beat the Matlab code in many cases, I'd expect. Check on some of the "coding challenges" here on ni.com -- several demonstrate impressively fast algorithms implemented in LabVIEW. The Mathworks site has even more, far more nicely presented contests. [Personally, I favor the open-source collaborative nature of the Matlab contest, building one's solution using the best features out of prior entries.

4. If the processing speed requirement has to do with generating outputs as a real-time response to inputs, then the algorithm speed alone won't be the only factor. The real-time platform and environment, including signal I/O, may also be a big consideration. Using LabVIEW RT does require a bit different mindset than LabVIEW on Windows, but there aren't any real drastic departures. Having used RT, I find that its lessons are usually helpful on Windows as well. I can't comment on Matlab's real-time toolkits/environment/hardware, etc.

Benchmark results often depend heavily on the nature of the benchmark being used and aren't always reliable predictors of normal real-life use. If you can describe your app in more detail, folks may be able to offer better tips. My own bias is that just about anytime there's a wire connecting my computer to a real-world signal, I pretty much assume I'll be using LabVIEW to deal with it. I do however recognize the strengths of Matlab & Simulink. I've made LV functions to help me do things similar to "data[find[data > threshold]] = NaN;" but it isn't nearly as elegant as the Matlab script.

LabVIEW [viết tắt của nhóm từ Laboratory Virtual Instrumentation Engineering Workbench] là một phần mềm máy tính được phát triển bởi công ty National Instruments, Hoa Kỳ. LabVIEW còn được biết đến như là một ngôn ngữ lập trình với khái niệm hoàn toàn khác so với các ngôn ngữ lập trình truyền thống như ngôn ngữ C, Pascal. Bằng cách diễn đạt cú pháp thông qua các hình ảnh trực quan trong môi trường soạn thảo, LabVIEW đã được gọi với tên khác là lập trình G [viết tắt của Graphical, nghĩa là đồ họa].

Các khả năng chính của LabVIEW[sửa | sửa mã nguồn]

LabVIEW được dùng nhiều trong các phòng thí nghiệm, lĩnh vực khoa học kỹ thuật như tự động hóa, điều khiển, điện tử, cơ điện tử, hàng không, hóa sinh, điện tử y sinh,... Hiện tại ngoài phiên bản LabVIEW cho các hệ điều hành Windows, Linux, Hãng NI đã phát triển các mô-đun LabVIEW cho máy hỗ trợ cá nhân [PDA]. Các chức năng chính của LabVIEW có thể tóm tắt như sau:

  • Thu thập tín hiệu từ các thiết bị bên ngoài như cảm biến nhiệt độ, hình ảnh từ webcam, vận tốc của động cơ,...
  • Giao tiếp với các thiết bị ngoại vi thông qua nhiều chuẩn giao tiếp thông qua các cổng giao tiếp: RS232, RS485, USB, PCI, Ethernet
  • Mô phỏng và xử lý các tín hiệu thu nhận được để phục vụ các mục đích nghiên cứu hay mục đích của hệ thống mà người lập trình mong muốn
  • Xây dựng các giao diện người dùng một cách nhanh chóng và thẩm mỹ hơn nhiều so với các ngôn ngữ khác như Visual Basic, Matlab,..
  • Cho phép thực hiện các thuật toán điều khiển như PID, Logic mờ [Fuzzy Logic], một cách nhanh chóng thông qua các chức năng tích hợp sẵn trong LabVIEW.
  • Cho phép kết hợp với nhiều ngôn ngữ lập trình truyền thống như C, C++,...

Các phiên bản LabVIEW[sửa | sửa mã nguồn]

Từ khi ra đời đã có nhiều thay đổi và cải tiến, ngày nay bản mới nhất tính tới tháng 4 năm 2007 là bản LabVIEW 8.2 với nhiều tính năng mới và các mô-đun cũ và mới tương thích với phiên bản này như: mô-đun mô phỏng quá trình, mô-đun xử lý hình ảnh, điều khiển chuyển động, cơ điện tử, công nghệ hóa sinh...

Xu hướng của LabVIEW[sửa | sửa mã nguồn]

Nhờ tính năng hỗ trợ mạnh và nhanh chóng cho các ứng dụng trong kỹ thuật, lĩnh vực giáo dục nên LabVIEW được dùng nhiều trong các phòng thí nghiệm và trung tâm nghiên cứu cũng như các hệ thống công nghiệp. Nhiều trường đại học đã đưa LabVIEW trở thành một môn học chính thức.

Chủ Đề