Risolto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

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

circa 14 anni fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

circa 14 anni fa

Risolto


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

circa 14 anni fa

Risolto


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

circa 14 anni fa

Risposto
Binary to decimal & Decimal to Binary Help
*ADD* Here is a function that might return what you wanted. It involves manipulation of the ieee74 binary representation of a do...

circa 14 anni fa | 0

Risolto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

circa 14 anni fa

Risolto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

circa 14 anni fa

Risolto


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

circa 14 anni fa

Risposto
How to pass string to matlab function in C programs
An mxArray can also contain a string. An mxArray is a structure that wraps everything (nicely?): <http://www.mathworks.se/hel...

circa 14 anni fa | 0

Risposto
Have trouble to solve the equation and plot
You realize that no matter the value of U (well, except in the cases where _2*x-U=0_), the solution of your equation will always...

circa 14 anni fa | 0

Risposto
I want to read a text file having strings and numeric data. Is there any better function than textscan?
This could work: fid = fopen('bla.txt','r'); %Advance five lines: linesToSkip = 5; for ii = 1:linesToSkip-1 ...

circa 14 anni fa | 2

Risposto
Collect conditional matrices from a loop in a 2D or cell array
Sounds like you need a cell array B =[... 7.797562562, -0.832787948, -1.725054903;... 2.11093262, 3.1385...

circa 14 anni fa | 0

| accettato

Risposto
Using ' findobj ' command and then determining the figure objects from the list of handles
Try plot(rand(10,1)); obj_h = findobj(); get(obj_h,'Type') It will give you an idea of the hierarchy. You have the...

circa 14 anni fa | 1

Risposto
Display long statements on multiple lines in output
One way to go. Insert newline in your string, and display using fprintf: yourString = 'One line \n Two line \n Three line';...

circa 14 anni fa | 0

| accettato

Risposto
how to find the position of a given number
your_answer = strfind(num2str(1050),num2str(5));

circa 14 anni fa | 1

Risposto
how to find the number of 1 in a single column?
your_answer = sum(your_input)

circa 14 anni fa | 0

Risposto
calling matlab from fortran program
Yes, it is possible. <http://www.mathworks.se/help/techdoc/apiref/bqoqnz0.html> I guess, the functions you want to look at...

circa 14 anni fa | 0

Risposto
How to pad zeros?
If you want to add a dark edge (that's what the zeros will be), at the bottom and to the right: load mandrill [m n] = si...

circa 14 anni fa | 0

| accettato

Risposto
why 'blsprice' is an undefined function??
Use the _ver_ command to see what toolboxes you have installed. If the financial toolbox is not there, that would explain your p...

circa 14 anni fa | 0

| accettato

Risposto
White Square Appearance in Plot
Google is your friend: <http://www.peteryu.ca/tutorials/matlab/plot_over_image_background>

circa 14 anni fa | 0

| accettato

Risposto
how to break an image into sub images
Google, as well as Matlab answers are your friends: <http://stackoverflow.com/questions/1637000/how-to-divide-an-image-into-b...

circa 14 anni fa | 0

Risposto
Removing rows and columns of a matrix based on elements of another matrix
I think you are looking for the [] operator: B(A(1,3),:) = []; B(:,A(2,3))= []; You should not do it one after the ot...

circa 14 anni fa | 0

Risposto
Convhull formula derivaiton in dotnet
Well, I'm going to be an heretic, but if you are going to use dotnet, maybe it is a better idea to directly use a windows execut...

circa 14 anni fa | 0

| accettato

Risposto
switching between 2 values
Maybe a sine wave plus some noise would do the trick? numSteps = 1000; temp = 20.5 + 3.*sin([1:numSteps]') + 3*randn(num...

circa 14 anni fa | 0

Risposto
Pointer to MATLAB function?
I am not entirely sure this is what you mean but here goes: if (first_selection) fun1 = @(x) cos(x).^2; end if...

oltre 14 anni fa | 1

Risposto
Graph bar with plot
Look at the documentation doc bar For example: bar(m,'g','EdgeColor','k','BarWidth',0.9)

oltre 14 anni fa | 0

Risposto
Determining how many "peaks" in a graph
<http://www.mathworks.com/matlabcentral/fileexchange/4242>

oltre 14 anni fa | 0

Risposto
How to make a matrix of matrices in Matlab? (to be used to solve a system of linear equations)
Yes, you can, you need to use the curly braces: test = cell(2,1); test(1) = {rand(10)}; test(2) = {rand(10,1)}; li...

oltre 14 anni fa | 0

Risposto
3D matrix representation problem
conn = zeros(3,3,3); conn(2,2,:) = 1; conn(:,2,2) = 1; conn(2,:,2) = 1; CC = bwconncomp(U3,conn); Note that the...

oltre 14 anni fa | 0

Carica altro