Resuelto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

más de 9 años hace

Resuelto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

más de 9 años hace

Resuelto


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

más de 9 años hace

Resuelto


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

más de 9 años hace

Respondida
How to create a standalone application of a script that calls "sim" function ?
To create a standalone from a Simulink model, you will need the <mathworks.com/products/simulink-coder/ Simulink Coder>. I don't...

más de 9 años hace | 0

Respondida
conversion of daily cell into monthly cell.
Use vertical concatenation. month = [day1; day2; day3; ...; day31]; % day1 through day31 would be the variables containing ...

más de 9 años hace | 0

Respondida
Getting error while plotting a 2d countour
In a GUI created in GUIDE, you may have to specify the axes in which to create the contour. contour(handles.axesName, x, y, ...

más de 9 años hace | 0

Resuelto


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

más de 9 años hace

Resuelto


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

más de 9 años hace

Resuelto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

más de 9 años hace

Resuelto


inner product of two vectors
inner product of two vectors

más de 9 años hace

Resuelto


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

más de 9 años hace

Resuelto


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

más de 9 años hace

Resuelto


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

más de 9 años hace

Resuelto


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

más de 9 años hace

Resuelto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

más de 9 años hace

Resuelto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

más de 9 años hace

Resuelto


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

más de 9 años hace

Resuelto


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

más de 9 años hace

Resuelto


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

más de 9 años hace

Resuelto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

más de 9 años hace

Respondida
Will you show me examples of changing time zones with datetime?
Setting the TimeZone property doesn't change the time of a datetime vector, it just tells Matlab which time zone the datetime ob...

más de 9 años hace | 1

Respondida
How to overlay plots one above the other?
Set the 'Clipping' property of what you want outside the axes to off. <https://de.mathworks.com/help/matlab/examples/clipping...

más de 9 años hace | 1

Respondida
Invalid Message ID Format. Is my syntax wrong?
You do not need message() for that function. function area = areaof3ang(x1,y1,x2,y2,x3,y3) if nargin~=6 % this is...

más de 9 años hace | 0

| aceptada

Respondida
How to force output of large figure to not be "scaled", or how to properly print a pdf whose dimensions won't fit on the [small] screen
I haven't exported to PDF, but I used to have similar problems when exporting figures to emf. I have a short script that fixes ...

más de 9 años hace | 0

Resuelto


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

más de 9 años hace

Problema


pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1 and price p1 * Slice B with angle alpha2, ...

más de 9 años hace | 2 | 41 solvers

Respondida
How to get 1807 point data array to 1806 data array?
The second input must be a vector, not the size of the output. So if you want to interpolate between the points, use something l...

más de 9 años hace | 0

Respondida
can't use the help docements about matlab2015a
It sounds like a currupt Matlab installation. I would suggest you reinstall Matlab and if the problem still persists, call the M...

más de 9 años hace | 0

| aceptada

Respondida
How do I write a matlab code that requests the user for an array of integers and stores that array into the variable called A. How do I determine whether the integer is odd or even.
doc input Will tell you how to get user input. doc mod could be useful for finding out if a number is odd or even.

más de 9 años hace | 0

Cargar más