Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

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

fast 14 Jahre vor | 0

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

Gelöst


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

fast 14 Jahre vor

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 2

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 1

Beantwortet
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';...

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 1

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 1

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

Mehr laden