Question

Given a matrix of torque and speed of engine in MATLAB. Write a code to obtain...

Given a matrix of torque and speed of engine in MATLAB. Write a code to obtain maximum output of engine at certain torque and speed of engine.

Homework Answers

Answer #1

Matlab code

clc
clear all
T=[2 3 5;4 5 8]; % POwer matrix
N=[6 7;8 9;9 10]; % speed matrix
a=size(T);
m=a(1)*a(2); % total no of torque in a torque matrix
b=size(N);
n=b(1)*b(2); % total no of speed in a speed matrix
j=1;
while j<=n
i=1;
while i<=m
P(i,j)=T(i)*N(j);
  
i=i+1;
end
j=j+1;
end

P % all combination for power
Pmax=max(max(P)) %maximum power

OUTPUT

P =

12 16 18 14 18 20
24 32 36 28 36 40
18 24 27 21 27 30
30 40 45 35 45 50
30 40 45 35 45 50
48 64 72 56 72 80


Pmax =

80

Know the answer?
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
Similar Questions
Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1...
Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1 on the super- and sub-diagonal. Then replace the (1,1) element of A with a 1. (Make your commands capable of handling an arbitary sized NxN matrix by first defining N=5, then using the variable N as the size in each of the commands.)
Exercise 1: Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal,...
Exercise 1: Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1 on the super- and sub-diagonal. Then replace the (1,1) element of A with a 1. (Make your commands capable of handling an arbitary sized NxN matrix by first defining N=5, then using the variable N as the size in each of the commands.)
Write a code in matlab for going through every element in a imported image matrix that...
Write a code in matlab for going through every element in a imported image matrix that has been gray scaled using for loops (going through every row and column) and changing every element that is equal to 255 to 1 and every number less then 255 equal to 0. Then find the x and y coordinate of each element now equal to 0 in that image matrix once again going through each row and column.
Please do this in Matlab Using a single for-loop and no if-statements, write a code that...
Please do this in Matlab Using a single for-loop and no if-statements, write a code that will create a 10x10 matrix with 2 on the diagonal, and -1 on any entry right next to the diagonal.
The following code must be written in matlab How to convert a 4d unit8 matrix of...
The following code must be written in matlab How to convert a 4d unit8 matrix of size 28 28 1 50000 in Matlab to a matrix of size 784*5000 Give an example that clearly solves this issue. Thanks
write a code that plots vectors in a matrix one by one. Everytime a vector is...
write a code that plots vectors in a matrix one by one. Everytime a vector is plotted I want to have an option to store in to a one of three (new) matrices eaither by clicking or pressing the keyboard. [MATLAB]
Write a MATLAB function that outputs number of values in a matrix that’s greater than a...
Write a MATLAB function that outputs number of values in a matrix that’s greater than a compare value. The function must able to take in an arbitrary size matrix. Name your script/program as “Quiz 2”. Examples : Matrix = [1 2 3; 4 5 6]           Compare_Value = 2 Output = 4 Matrix = [1 2 3 1; 4 5 6 8]           Compare_Value = 2 Output = 5
Draw the speed-torque characteristics of a DC shunt motor. Write the expression for speed torque relation
Draw the speed-torque characteristics of a DC shunt motor. Write the expression for speed torque relation
MATLAB Write a script "readFile.m" which:   a. reads a given file "file.dat" into a matrix "XYZ",  ...
MATLAB Write a script "readFile.m" which:   a. reads a given file "file.dat" into a matrix "XYZ",   b. extracts the columns of the data from "XYZ" into arrays "c1", "c2", ..., "cN",   c. plots some column versus another column, with a title, and labeled axes.   To test and debug your code, create a "file.dat" with 3 rows and N=2 columns ( so a 3×2 matrix ).   The first column should be sorted. You can just enter some numbers in "file.dat" in...
Write a MatLab code J = Jcb(X) that computes the jacobian of a nonlinear vector of...
Write a MatLab code J = Jcb(X) that computes the jacobian of a nonlinear vector of functions of X. Input X is a vector of unkown functions of X and output J is the jacobian of the nonlinear vector function of X.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT