Answered
Change in odometer.
Hi Ireedui, It looks like you wanted to get the difference of two consecutive odometer readings. The diff function will help i...

6 years ago | 1

| accepted

Answered
save values in array
Hi there, It is not pretty clear as what you wanted to do. To get the desired output, perform the following: A={[1,6,3,2],[3,...

6 years ago | 1

Answered
How to convert decimal to binary form along with fractional values?
Hi Rajesh, A similar question is asked and answered in this https://www.mathworks.com/matlabcentral/answers/25549-convert-floa...

6 years ago | 0

| accepted

Answered
average each block of class in a matrix
Hi Alessio, The mean function will help in this case. Here is the documentation page of mean function having different examples...

6 years ago | 0

Answered
write a matlab function
Hi Jiaqi, I suggest you to go through MATLAB onramp course https://www.mathworks.com/learn/tutorials/matlab-onramp.html , which...

6 years ago | 1

| accepted

Answered
I need help understanding what I am being asked
Hi Anthony, You are being asked to derive the equation of flow rate at each node in the pipe network. Then, solve those system ...

6 years ago | 0

Answered
Raised Cosine Filter for Matlab
Hi Nathan, The usage of rcosdesign function in the code is correct, but the usage of upfirdn function is incorrect. The input ...

6 years ago | 0

| accepted

Answered
How to save a matrix to be able to use it in another m file
Hi Olivia, You can use save and load functions for this purpose. In the function, use save('RM03Input',RM03input1to1) % first ...

6 years ago | 0

| accepted

Answered
Newton's method(calculating the angel)
Hi Ahmed, To make the code working, perform the following changes: Update the while loop with proper condition Calculate fe a...

6 years ago | 0

Answered
Newton's method(calculating theta)
Hi Ahmed, The condition you placed for the while loop is a series of vector. Update the condition as below and code requires mi...

6 years ago | 0

| accepted

Answered
How write a function that takes a matrix and period omega?
Hi Prathik, You are on the right track itself. Ensure that you define the output variable F and use omega input in the functio...

6 years ago | 0

| accepted

Answered
why is my nested if statement not working?
Hi Josh, The condition for the if statement must be placed side rather than in next line. Update the code of if statement with...

6 years ago | 0

| accepted

Answered
how would i get a while loop to repeat this code 26 times?
Hi Josh, You can do the following i = 1; % loop index while i <= 26 shiptext= [22 6;38 21;24 36;2 30;6 2;15 31;22 15;24 ...

6 years ago | 0

| accepted

Answered
Creating a vector randn
Hi, This page helps you to solve this. https://www.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-varian...

6 years ago | 0

| accepted

Answered
about rand and randi command
Hi Oguzhan, For the sample code, you can use this function signature a = randi([0 10],1,1); % it will generate a random intege...

6 years ago | 0

| accepted

Answered
unknown code- can anyone help me with what this code does?
Hi Josh, This code performs sorting in descending order. r=rand(15,1) % This statement initializes r with 15 random numbers f...

6 years ago | 1

| accepted

Answered
Raised Cosine Filter in Matlab
Hi Nathan, Access the vector bits from 1 to 50 elements and pass as the first argument of stem function. Then, pass the bits d...

6 years ago | 0

| accepted

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

6 years ago

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

6 years ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

6 years ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

6 years ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

6 years ago

Solved


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

6 years ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

6 years ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

6 years ago

Solved


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

6 years ago

Solved


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

6 years ago

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

6 years ago

Solved


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

6 years ago

Solved


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

6 years ago

Load more