Risolto


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...

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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 ...

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risposto
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...

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

Risposto
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, ...

oltre 9 anni fa | 0

Risolto


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

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risolto


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....

oltre 9 anni fa

Risolto


inner product of two vectors
inner product of two vectors

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risolto


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 ...

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risolto


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, ....

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risolto


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 + ...

oltre 9 anni fa

Risolto


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

oltre 9 anni fa

Risolto


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...

oltre 9 anni fa

Risposto
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...

oltre 9 anni fa | 1

Risposto
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...

oltre 9 anni fa | 1

Risposto
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...

oltre 9 anni fa | 0

| accettato

Risposto
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 ...

oltre 9 anni fa | 0

Risolto


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...

oltre 9 anni fa

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, ...

oltre 9 anni fa | 2 | 41 risolutori

Risposto
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...

oltre 9 anni fa | 0

Risposto
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...

oltre 9 anni fa | 0

| accettato

Risposto
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.

oltre 9 anni fa | 0

Carica altro