Question

Multiply each number in a matrix by the diagonal number of a given row using a for loop

I have this matrix here a=[2 -5 7;1 1 3;4 5 12]; I need to multiply each of the numbers in the row by the diagonal of tha...

4 years ago | 1 answer | 0

Question

Find the sum of the non perimeter elements of a matrix using a for loop

I have this matrix B=[-3 4 7;9 11 -13;-17 19 -23;-29 31 37;39 41 47] and I need to find the sum of the non perimeter elem...

4 years ago | 3 answers | 0

Question

Sum of numbers from a notepad file

I have a notepad file with these numbers 1 2 3 4 5 6 7 8 12 8 7 6 5 4 3 2 1 14 I need to take the sum of all the numbe...

4 years ago | 2 answers | 0

Question

Sorted vector changing dimensions

I have two vectors here a=[4 2 1;9 3 5] a=[9 8;7 6;5 4] I'm sorting them from left to right using this code m=num...

4 years ago | 1 answer | 0

Question

Matrix sorting, smallest to biggest

So I need to sort a matrix from smallest to biggest going from left to right, with multiple rows. I was told in a previous threa...

4 years ago | 2 answers | 0

Question

Sorting a matrix from smallest to biggest left to right

I made this code here for a matrix that was only 1 row. Now that I have matrices with multiple rows I don't know how to make it ...

4 years ago | 2 answers | 0

Question

Help with finding the min/max for 3 matrices

I have a function mfile here function[maxm]=my_matrix(a) n=size(a); maxm=-inf; minm=inf; for i=1:1:n(1); for j=1:1...

4 years ago | 1 answer | 0

Question

Finding the standard deviation of a matrix

I'm trying to find the standard deviation of a matrix, but I'm getting a different answer when I do it myself than what matlab g...

4 years ago | 2 answers | 0

Question

Find the summation of the outer elements of a rectangular matrix

Using this matrix a=[2 -3 1 0;5 7 1 -4;9 -6 0 2] I need to find the sum of all the outer numbers in this matrix using lo...

4 years ago | 2 answers | 0

Question

Help finding the min and max of a matrix without using min/max commands

I'm having trouble trying to find the min and max of this matrix. So far I can only get it to display the min which is -12, but ...

4 years ago | 2 answers | 0

Question

How to find value of an infinite series using for-end loops

Write a program to determine values from the following infinite series. f(x)=sqrt(x)/42+1/2x+1/3x^2+1/4x^3+1/5x^4+1/6x^5......

4 years ago | 1 answer | 0