Answered
How to combine two functions into a single expression?
Passing input arguments: >> a = ProbabilityPXnew( FPave, Vavenew, Vstdnew, N ); where function a = ProbabilityPXn...

13 years ago | 0

Answered
problem in importing data through textscan
Try this fid = fopen('cssm.txt', 'r' ); data_f2 = textscan( fid,'%s%s%f' ... ...

13 years ago | 1

| accepted

Answered
Matlab Publish feature error
With R2012a, 64bit, Winows7, publish of this code produce the expected result. No error message. % Plot Setup Y1 = r...

13 years ago | 0

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

13 years ago

Solved


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

13 years ago

Answered
finding same gene combination
I failed to come up with an algorithm based on dataset objects. I find the documentation hard to interpret. Here is an algorithm...

13 years ago | 0

Answered
[Quick Question]Multiplications of all elements
Yes. Try B = prod( A ) B = 864

13 years ago | 1

| accepted

Answered
Improve computation speed of function
I run one of your functions (R2012a 64bit, Windows7, 4 cores, 8GB, on a three years old vanilla Dell) >> Z = randn(300,30...

13 years ago | 0

Answered
Compare date & time (efficiency question)
* "lots of data" means different things to different people. Does it fit in memory - installed RAM? RAM is cheap. * datenum con...

13 years ago | 0

| accepted

Answered
Resample issue with findpeaks
"Let's say I plot(xx) or plot(yy). It only shows 50 values. If I plot (xx,yy) I get 100 values." If size(xx) and size(yy) both a...

13 years ago | 0

Answered
Inserting space between values in vector
One more way to do it x = 1:4; x1 = cat( 1, x, zeros(size(x)) ); x1 = transpose(x1(:));

13 years ago | 0

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

13 years ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

13 years ago

Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

13 years ago

Answered
processor use only 13% when excuting function/script
Basically, Matlab uses *one* core, which explains 12-13%. (Single threaded.) Some Matlab functions use several cores. Para...

13 years ago | 0

Answered
Changing a function to take an input of cells rather than a matrix
Do you really need to change your friends function? function My_QDViewer( my_cell_array, threshold) data = ... ...

13 years ago | 0

Answered
OOP: passing arguments to a handle class method
I assume that # function ErrorVal = HeightCorrection(tank) # function Err = OutOfBoundsCorrection(obj) each defines a met...

13 years ago | 2

| accepted

Answered
Stop process and close plot with keyboard
Maybe including the function, keyboard, in your code would help you achieve the required functionality.

13 years ago | 0

Answered
how show the clusters graphically?
A <http://www.mathworks.se/matlabcentral/fileexchange/index?term=cluster+category%3A%22Graphics%22&utf8=%E2%9C%93 search for "cl...

13 years ago | 0

Answered
Heatmap creates new windows on each call; only one computer
Is this the FEX-contribution that you use? Customizable Heat Maps by Ameya Deoras Visualize data as a heatmap with m...

13 years ago | 0

Answered
Skip until import data
I have deleted a sketchy outline, which was not helpful. *--- Working code ---* *Purpose:* # learn to use Matlab ...

13 years ago | 0

| accepted

Answered
Constructing an if statement when a column contains only one data point and the rest are NaNs
This script prints Column 2 has it Column 3 has it *====* %% M = [ 2.8000 0.2333 0.0010...

13 years ago | 0

| accepted

Answered
Setting object properties from a class method
# Are you aware of the difference between handle and value classes? From your code fragments, I conclude that you anticipate the...

13 years ago | 8

| accepted

Answered
Referencing a line of code
Search "TODO/FIXME Report" in the online help % TODO: To change SG value skip down to line __ or change equation on line __...

13 years ago | 1

| accepted

Answered
It seems thta the function "polyfit" doesn´t work anymore in my Matlab, how can I solve this problem?
The error message indicates that the file, C:\Users\pca02\Desktop\Documents\MATLAB\polyfit.m, shadows the true polyfit.m. You se...

13 years ago | 4

| accepted

Answered
How can we explain this error?
I cannot reproduce the error with R2012a 64bit on Windows7. >> datenumber = datevec('06/08/2012 15:20','dd/mm/yyyy HH:M...

13 years ago | 0

Answered
Weird case: Loop runs faster with fprintf?
I cannot reproduce your result with the function, cssm (see below), on R2012a 64bit, Windows7. Here are two results recorded *af...

13 years ago | 1

Answered
loading file stored as string and then plotting data from file
I propose you replace load(filew) A = filename by A = load( filew ); . That makes the code easier t...

13 years ago | 1

| accepted

Answered
Piece-wise handle function help
Try >> cssm ans = -25 where in one m-file, cssm.m function y = cssm y = foo( @piece_w...

13 years ago | 1

Answered
updating and saving .dat files
I guess "different software" requires "'\r\n'" for newline in the format specifier.

13 years ago | 0

Load more