Solved

Back to basics 15 - Benchmark

Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

plus d'un an ago

Solved

DC chopper

Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

plus d'un an ago

Solved

Matrix to column conversion

Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

plus d'un an ago

Solved

Find nth maximum

Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

plus d'un an ago

Solved

UICBioE240 2.10

Given a vector of numbers, give the difference between the maximum and minimum values.

plus d'un an ago

Solved

Square the input

Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

plus d'un an ago

Solved

UICBioE240 problem 1.6

Find the tangent line of a right triangle given the two of the sides. So if A = [1 1] B = sqrt(2)

plus d'un an ago

Solved

UICBioE240 problem 1.18

exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.

plus d'un an ago

Solved

Matlab Basics - Pick out parts of a vector

Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

plus d'un an ago

Solved

Do you like your boss?

Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

plus d'un an ago

Solved

Back to basics 19 - character types

Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

plus d'un an ago

Solved

07 - Common functions and indexing 3

Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

plus d'un an ago

Solved

Sum the entries of each column of a matrix which satisfy a logical condition.

Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

plus d'un an ago

Solved

When can one be the Life Member of the IEEE?

Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 an...

plus d'un an ago

Solved

matrix of natural number

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

plus d'un an ago

Solved

Getting the absolute index from a matrix

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

plus d'un an ago

Solved

Angle between Two Vectors

The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

plus d'un an ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

plus d'un an ago

Solved

Make a random, non-repeating vector.

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

plus d'un an ago

Solved

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

plus d'un an ago

Answered

find the entries in a set of elements

A = [35,46, 78, 23, 5, 16, 81, 3, 35]; a = A(7); % to find the seventh entry of A b = sum(A([3 5])); % to find the sum of thir...

find the entries in a set of elements

A = [35,46, 78, 23, 5, 16, 81, 3, 35]; a = A(7); % to find the seventh entry of A b = sum(A([3 5])); % to find the sum of thir...

plus d'un an ago | 0

Answered

[Maximum Timing for Simulation]

I'm not sure about the maximum time that you can specify for a model. However If you want to run the model continuously until y...

[Maximum Timing for Simulation]

I'm not sure about the maximum time that you can specify for a model. However If you want to run the model continuously until y...

plus d'un an ago | 0

| accepted

Answered

Extraction of individual matrix from cell array

After loading the mat file,I guess you would probably wanna do this. for i=1:numel(Microtrips),eval(['MT' num2str(x) ' = Mic...

Extraction of individual matrix from cell array

After loading the mat file,I guess you would probably wanna do this. for i=1:numel(Microtrips),eval(['MT' num2str(x) ' = Mic...

plus d'un an ago | 0

| accepted

Solved

02 - Vector Variables 5

_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

plus d'un an ago

Solved

Volume of a box

Given a box with a length a, width b, and height c. Solve the volume of the box.

plus d'un an ago

Solved

Determine the length of a string of characters

Determine the length of a string of characters

plus d'un an ago

Solved

04 - Scalar Equations 2

Define the variables a and b: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b.png>...

plus d'un an ago

Solved

Calculate area of sector

A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

plus d'un an ago

Solved

06 - Matrix Equations 1

Define the vectors _aVec_ and _bVec_ and the matrix _aMat_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http:/...

plus d'un an ago

Solved

Average Grade

Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

plus d'un an ago