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.)
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 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
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...
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
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.
MATLAB: Write a function called matrix_problem1 that takes a matrix A of positive integers as its...
MATLAB: Write a function called matrix_problem1 that takes a matrix A of positive integers as its sole input. If the assumption is wrong, the function returns an empty matrix. Otherwise, the function doubles every odd element of A and returns the resulting matrix. Notice that the output matrix will have all even elements. For example, the call B = matrix_problem([1 4; 5 2; 3 1], will make B equal to [2 4; 10 2; 6 2]. The function should work...
Write a user defined MATLAB program that performs power factor correction. The inputs to the MATLAB...
Write a user defined MATLAB program that performs power factor correction. The inputs to the MATLAB function should be voltage across the load (in Vrms, assume 0 phase), frequency Resistance of the load Inductance of the load power factor of the load target power factor The output of the function should be the size of the capacitor that one would need to place in parallel with the load to reach the target power factor. Please submit the code for the...
write a matlab code to calculate the correlation coefficient for five neighboring pixels an in an...
write a matlab code to calculate the correlation coefficient for five neighboring pixels an in an image preferable ( 256 x 256 ) lena image