Question

I have matlab signal file consisting of 10 signals. I need a code line that allow...

I have matlab signal file consisting of 10 signals. I need a code line that allow me to load only 8 signals out of 10 from the file. I used command ;
X (:,:) = load(signal.mat)
but how to take out 2 signals out so that the plot shows only 8 signals instead of 10 ?.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  1. Use Python code to read file content, signal plot value could be in CSV format in the file
  2. Use Python csv module to read line by line values in the input file
  3. Use open("file_path","r") function to open the file (replace your input file name in the place of "file_path")
  4. Then use csv.reader() function to create csv reader objcet to read the input file
  5. Then convert the reader objcet into list type object by using list()
  6. Now find the len of the list object using len() function
  7. Then create if conditional statement to check wether len(list) is equal to 8 or not
  8. if len(listobject) is equal to 8 proceed with load command
  9. otherwise skip two signal samplings by slicing list object list_obj[0:9]
Add a comment
Know the answer?
Add Answer to:
I have matlab signal file consisting of 10 signals. I need a code line that allow...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need Matlab code Message Carler cos (20.000rt) modulation index: 0,2 signal: 2 cos (2001tt) signal...

    I need Matlab code Message Carler cos (20.000rt) modulation index: 0,2 signal: 2 cos (2001tt) signal : - Modulate and demodulate these 2 signals and plot time domain and frequency spectrum for all steps Write whole code clearly. Use Matlab.

  • (COMMAND LINE) I have a file, abc.csv and I am interested in a command line solution...

    (COMMAND LINE) I have a file, abc.csv and I am interested in a command line solution (not something like C coding) for the following: In which zip code was the highest number of narcotic/drug offenses. ZIP_CODE and ABC_CODE are the relevant headings but there are many headings and many records within the file. Within ABC_CODE, 35A and 35B are narcotic and drug offenses. So, I want to find out which zip code has the highest number of narcotic/drug offenses, which...

  • I need a matlab code to answer the questions below ICE09B Make an Array Develop a...

    I need a matlab code to answer the questions below ICE09B Make an Array Develop a MATLAB code which will produce an array that looks like the following: 4 10 1. You must start with a blank array and build the array with a DNFL. You can NOT just load the array with an assignment statement. Hint: Use "addition" for your variables Square all values in the array 2. Blackboard will ask you for a screenshot of your properly working...

  • MATLAB question I need the code exactly as you would write it in MATLAB. thank you...

    MATLAB question I need the code exactly as you would write it in MATLAB. thank you 1. Consider a Gaussian solution of the traveling-wave form ψ(z,t)-exp(-a(z-vt)2). The parameter values are a 1, 2. (a) Explain the physical meaning of these parameters (eg. what would happen if we took a = 10 instead?) Determine the direction of propagation of this solution: Is it traweling to the left or to the right? (2pts) (b) Write a Matlab code to plot the Gaussian...

  • write comments for each line of the matlab code and explain . I need explanation in...

    write comments for each line of the matlab code and explain . I need explanation in each line clear all; close all; load nb2_noise_data.mat; fs = 1000; N = 256; fl1 = 170; fh1 = 230; fl2 = 370; fh2 = 430; f = [0, fl1, fl1, fh1, fh1, fl2, fl2, fh2, fh2, fs/2] /(fs/2); G = [0, 0 ,1 , 1 , 0, 0, 1, 1, 0 , 0 ]; figure; plot(f*(fs/2),G); [b,a] = yulewalk(12,f,G); X = filtfilt(b,a,x); f...

  • Use matlab Need the matlab code Problem 3: (a) Use Fourier transform to find i(t) in...

    Use matlab Need the matlab code Problem 3: (a) Use Fourier transform to find i(t) in the circuit below if v.( 10e2tu(t). Use MATLAB to solve your problem. (b) Plot the magnitude and phase spectrum of the current I(o). 2Ω 3 20 1 H Submit the solution in word file. The used MATLAB code should be included Due date: last day of classes

  • Hello, I have questions on Matlab. Let's say that I have an equation. Signal x(t)= cos(2*pi*10*t)...

    Hello, I have questions on Matlab. Let's say that I have an equation. Signal x(t)= cos(2*pi*10*t) is sampled at sampling frequency of Fs=100 Hz. How do I both Upsample and downsample this frequency by a factor of 2 in Matlab? I need to see the code and how the graphs look. Thank you for the help.

  • Need MatLab code Exercise: Use MATLAB to generate the sinusoidal waveform: x(t) = 3 cos(1200) Consider...

    Need MatLab code Exercise: Use MATLAB to generate the sinusoidal waveform: x(t) = 3 cos(1200) Consider the frequency of this sinusoid and use this information to select an appropriate time-step and time array that will allow this signal to be correctly represented and displayed on a new MATLAB figure window (display 4 periods of this wave only). Now set up an appropriate frequency array and use the fft() and fftshift() functions to generate and plot the Fourier Transform (magnitude spectra)...

  • (B) Implement Matlab code for each part as described below: i) Define the following signal in tim...

    Using MATLAB, Please read carefully, EXPLAIN CODE AND ANSWERS, DISCUSS RESULTS, I NEED EVERY PART (B) Implement Matlab code for each part as described below: i) Define the following signal in time and plot it where Ai 10, A2-3, fi-10 Hz, f2-40 Hz. part of the DFT, and discuss the results. zero. Do this carefully for both positive and negative frequencies. Call this signal G (f). ii) Compute the DFT S(f) of s (t) using the fft() function. Plot the...

  • yes you will need matlab software Can someone please help me. attached is the exercise i...

    yes you will need matlab software Can someone please help me. attached is the exercise i am doing in matlab. also attached is the exercise that i am suppose to be doing.also attached is part a of my code and part b. also attached is an error code i am getting. can someone please help me with this. thanks. explain in detail what i am doing wrong and what i need to do to fix it. you use enogn polnts...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT