Matlab fprintf help
This is the question:
I have already done part a, I need help with part b.


This is my current code:
% array of Pounds to convert to Kilograms
weight_pound = [50.543 65.676 75.343 80.937]
% for Loop that calls from the array weight_pounds
for index=1:4
%Convert weight from Pounds to Kilograms
weight_kg = weight_pound*0.453592
%Print out the conversion
% ‘%5.2f’ for 2 decimals for Kilograms
% ’%5.0f’ for no decimals in pounds
fprintf(‘%5.2f kg = %5.0f lb\n',weight_pound(index),weight_kg);
% end loop
end
Matlab isnt accepting my code. It says its full of errors. Help!
|
I found 2 erros in the code you wrote
|
| weight_pound = [50.543 65.676 75.343 80.937]; for index=1:4 weight_kg = weight_pound(index)*2.20462; fprintf('%5.1f kg = %5.0f lb\n',weight_pound(index),weight_kg); end |
|
Output 50.5 kg = 111 lb |
Matlab fprintf help This is the question: I have already done part a, I need help...
NEED help. Have to be done by hand and MATLAB. please help
2.) After the conversion above nearly reaches equilibrium, the mixture is pumped to a distillation column where form C is desired. The feed stream is 34% A, 24% B and 42% C by weight. The bottom exit stream is 10% A 20% B and 70% C, while the top exit stream only contains 20% C by weight and flows at 20 kg/hr. (a - 2 points) Arrange this...
Hi,
I need some help with the following question. I need the answer
in Python please.
10.23 LAB: Warm up: People's weights (Lists) (1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the list. (2 pts) Ex: Enter weight 1: 236.0 Enter weight 2: 89.5 Enter weight 3: 176.0 Enter weight 4: 166.3 Weights: [236.0, 89.5, 176.0, 166.3] (2) Output the average of the list's elements...
ZYBOOKS LAB: 10.23.1 Hello, I'm trying to solve this problem with creating a program code in Python about People's Weights. Here is the question: 10.23 LAB: Warm up: People's weights (Lists) (1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the list. (2 pts) Ex: Enter weight 1: 236.0 Enter weight 2: 89.5 Enter weight 3: 176.0 Enter weight 4: 166.3 Weights: [236.0, 89.5, 176.0, 166.3]...
MATLAB help!
I have some MATLAB Assignment to do, the proffesor requires
all the small parts in order to get full credit. Help me out, thank
you
f LAB SECTION NAME HW6P3 (30 points) following are infinite series representations of the function, un pra i a script file HW6P3 that determines the value of the function from the sum of the series for a given value of x. The program (1 pt) must prompt the user to enter a value...
Hello, can someone please help me correct this code? I greatly appreciate it. 7.16 Ch 7 Warm up: People's weights (Lists) (Python 3) (1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the list. (2 pts) Ex: Enter weight 1: 236.0 Enter weight 2: 89.5 Enter weight 3: 176.0 Enter weight 4: 166.3 Weights: [236.0, 89.5, 176.0, 166.3] (2) Output the average of the list's elements...
I ONLY NEED PART 4 I HAVE DONE 1,2,3 Arrays This assignment is designed in small progressive parts, with the intention of developing the skill of working with arrays. Do each part separately. Include in your submission the code and output for Part I, then the code and output for Part 2, etc. into a Word document. Specification: Part 1. Write a main function that declares an array of 10 int’s. Assign each element in the array a value between...
Hello I need help with the following, I already have some of the code done below Create an application that demonstrates how binary numbers are related to decimal numbers. The user should be able to enter the individual digits of a binary number in separate controls (your choice). There should be between 4 and 8 binary digits available for the user to set. When designing your application, use controls so that it is not possible for the user to enter...
help me with the problem below my percent body fat is 95% I weight 160 pounds my height is 5"2 There are several different ways to compute an ideal body weight. Method A of this laboratory enables you to compute and record your ideal body weight using skinfold measurements. (In Chapter 6 we discussed body fat percentage estimated from skinfold measurements.) Method B enables you to calculate and record your ideal body weight using the body mass index (BMI) procedure...
Lanuage C++ (Beginner level) Please...I need help with this assignment If I still have question, can i contact you? -------------------------- Program 1 - WRITE ALL THE CODE in ONE FILE... MyArrayPtrArith1.cpp Step 1 - Define the class Write a class, myArrayClass, that creates an integer array. * Add an 'arraySize' variable, initialize to zero ( default constructor function ) * Create int * ptrArray ( default constructor set to NULL ) * Add a default constructor ( see above for...
Hi please help with c++ programming.
This is my code. there's a syntax error. PLEASE FIX MY CODE
instead of re-designing the program.
Thanks
/*
Description of problem:
Introduction to Friends functions.
Create objects in the stack (not on the heap)
3.1: Add a friend function, kilotopound, which will convert
kilograms to pounds.
3.2: Add a copy constructor utilizing Lab 3.1 code.
Copy the fist object using a copy constructor. Output the contents
of both objects.
*/
#include <iostream>...