How to scale a value in matlab

19 ビュー (過去 30 日間)
A R 2020 年 2 月 21 日
コメント済み: A R 2020 年 2 月 25 日
Hi, I have a 1x256 data (modulated data of an image) in the range -8.9 to 48.7 which i want to transmit to analog output pin 0 of MCC USB. (USB 205 has 2 analog output pins) The usb 205 only takes data within 0-5 V. So i converted my 1x256 data to 0-5 V using min and max function and pushed it to the DAQ and it works well.
z=1x256 data
Now i have to convert b and c values within 0-5V so that I can transmit these values to analog output pin 1 of daq. Please share your suggestions.
Thank you!!

回答 (1 件)

Bhaskar R
Bhaskar R 2020 年 2 月 21 日
req_data = rescale(data, 0, 5);
  3 件のコメント
A R 2020 年 2 月 25 日
Thanks!! It really helped.



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by