Question
i want to make a matlab program that uses this information
EDIT Documents C M IN Folder Name examenfina examenfina pipe xlsx SELECTION : Users bryan ▸ OneDrive Editor - examenfinalform
the information on the first column is w and the information on the second column is l how do i make matlab read the information on the second column?
this is what i have so far ive already gotten matlab to read whats on the first columb bur i dont know how to make it read whats on the second column
folder Name examenfina C: Users bryan OneDrive Documents Matlab Final Test Editor - C:\Users bryan OneDrive Documents MaTLab
can you help me?thank you!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Source code with comment

pipe=xlsread('c:\pipe.xlsx','Batch1','A1:B15')
prompt='What colum do you want to print:';
x=input(prompt)% read a particular column number from console input
c=pipe(:,x)% Print the particular column values
'Full sheet details'
pipe % Full sheet

Source code without comment, Run the code, if you file curly red line after code, clear the read curly line and run it.

you may find red curly line after last line word 'pipe', please erase it and run it. code is working.

pipe=xlsread('c:\pipe.xlsx','Batch1','A1:B15')
prompt='What colum do you want to print:';
x=input(prompt)
c=pipe(:,x)
'Full sheet details'
pipe

/* Explanation */

Here pipe.xlsx file is kept at C drive. So, the file path is given as xlsread('c:\pipe.xlsx','Batch1','A1:B15').

If you put your excel file at MATLAB folder then no need to give the path, then only give the file name as

xlsread('pipe.xlsx','Batch1','A1:B15'). As here only the second column is required, but this source code is completely customized, means you can fetch details of any column and full full excel sheet also.

Here if you take x=2, it will give the detail values of second column.

Here value range from A1 to B15. Depending on columns, the range will be changed with respect to corresponding column heading alphabets.

*NOTE:After copying the code on matlab, curly red line can be shown at comment section, please clear all those comments and run the code.The comments are given to make clear about individual commands of matlab

Output: Here I tried to show the partial look of the output, after running code the full output will be shown like the given below.

Command Window What colum do you want to print:2 x = ans Second column value is 10.3000 10.5000 10.3500 10.2000 10.2500 10.45

Add a comment
Know the answer?
Add Answer to:
i want to make a matlab program that uses this information the information on the first...
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
  • This is what I have now: I need to make modifications: G G E ? Q...

    This is what I have now: I need to make modifications: G G E ? Q Search Documentation $ Angie Workspace Name Hans Value 988 Hi 75 Ix76 double HOME PLOTS APPS EDITOR PUBLISH VIEW H E T G Find Files > Insert fx DE Run Section s Compare - Go To - New Open Save Corriment % % Breakpoints Run Run and Advance Run and - - Print Find Indent - Advance Time FILE NAVIGATE EDIT RRFAKPOINTS Users angiechoisfolder...

  • MATLAB question: I have written a code to solve for a metals resitance. Here is the...

    MATLAB question: I have written a code to solve for a metals resitance. Here is the problem statement: Part 1 (Algorithms) – due Friday: Think about how you might solve the problem of calculating the resistance of a given group of metals depending on the type of metal, the length of the wire and the area of the wire (if given the diameter only – so you must calculate the area). Write instructions (an algorithm) for a script that behaves...

  • I need help in C++ . Project 3 – Parking Deck Ticketing System Objectives: Use if,...

    I need help in C++ . Project 3 – Parking Deck Ticketing System Objectives: Use if, switch, and loop statements to solve a problem. Use input and output statements to model a real world application Incorporate functions to divide the program into smaller segments Instructions: Your task is to write a program that simulates a parking meter within the parking deck. The program will start by reading in the time a car arrives in the parking deck. It will then...

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
ADVERTISEMENT