Solved


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

14 years ago

Answered
Warning "Unable to interpret LaTeX string ..."
In case you didn't know, you could suppress certain warnings, like this: warnState = warning('off', 'MATLAB:gui:latexsup:Ba...

14 years ago | 0

Answered
Using gcf in functions
<http://www.mathworks.com/help/matlab/ref/gcf.html |gcf|> is not a variable, but rather a function. So you don't need to treat i...

14 years ago | 3

Solved


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

14 years ago

Answered
How to find all XY Graphs in Simulink model
As you can see from the FRP for <http://www.mathworks.com/help/toolbox/simulink/slref/find_system.html |find_system|>, you can s...

14 years ago | 1

| accepted

Answered
Fastest way to dot product all columns of two matricies of same size
When you say you're doing the dot product, I assume you're doing this: v1'*v2 and not dot(v1, v2) The equivalent...

14 years ago | 0

Solved


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string |inStr| from a list of strings |strLi...

14 years ago

Problem


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string |inStr| from a list of strings |strLi...

14 years ago | 4 | 275 solvers

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

14 years ago

Solved


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

14 years ago

Answered
File modification alert from windows api
You may be able to use the .NET interface, using the <http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx F...

14 years ago | 2

| accepted

Answered
How do I activate Simulink with R2011a Student Version?
Where are you looking for the icon? There will be no separate Simulink icon in your OS desktop. You start Simulink by starting M...

14 years ago | 0

Answered
creating a single structure with 100 entries
You don't need to create a structure for that. You can do this: C2 = cat(3, C{:}); avg = mean(C2, 3) FYI, to answer y...

14 years ago | 1

| accepted

Answered
How do I delete a field variable from a structure
|handles.Data| is a field of variable |handles|. To delete a field, handles = rmfield(handles. 'Data'); To set the field...

14 years ago | 4

| accepted

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.

14 years ago

Answered
problem acquiring the video from webcam
Put a breakpoint on line 4 of your function |getCameraInfo|, and explore your variable |camera_info|. Maybe your laptop isn't re...

14 years ago | 0

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

14 years ago

Solved


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

14 years ago

Solved


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

14 years ago

Solved


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

14 years ago

Solved


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

14 years ago

Solved


Toolbox check part 3
In my ongoing quest to highlight obscure parts of MATLAB, the latest challenge is to take 2 string inputs, one a MATLAB toolbox ...

14 years ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

14 years ago

Solved


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

14 years ago

Answered
"if "function
You can use the <http://www.mathworks.com/help/matlab/ref/isstrprop.html |isstrprop|> function. If |answer| is the input you got...

14 years ago | 1

| accepted

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

14 years ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

14 years ago

Solved


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

14 years ago

Solved


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

14 years ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

14 years ago

Load more