Respondida
How to compare multiple strings and assign values to the comparison?
Copying beginning from Siva because I'm lazy: K = [{'111'} ; {'223'} ; {'111'} ; {'125'} ;{'111'} ; {'125'}] ; Solving yo...

más de 9 años hace | 1

| aceptada

Respondida
Can someone do this calculation without for loops ?
k = bsxfun(@times, a , reshape(b.^2,1,1,[])) alt_k = bsxfun(@times, a , permute(b.^2,[3,1,2]))

más de 9 años hace | 0

| aceptada

Respondida
how to do a good mesh creation of a point cloud
doc boundary

más de 9 años hace | 0

| aceptada

Respondida
how to increase the range of measurement of data cursor in a plot?
<http://se.mathworks.com/matlabcentral/answers/68079-how-to-add-additional-info-to-the-data-cursor Already a similar question>. ...

más de 9 años hace | 0

Respondida
Integrating individual matrix values using a loop
I'll give you a hint to get you started. Get rid of the loops and use element by element multiplication: [vm,tm]=meshgrid(v...

más de 9 años hace | 0

Respondida
Is there a way to save dataset?
save

más de 11 años hace | 0

| aceptada

Respondida
vectorization request with loop
n = 5; y = (11:20)'; y_p = cumsum(y)'; result = triu(bsxfun(@rdivide,y(1:n+1),y_p(1:n+1)))

más de 11 años hace | 1

| aceptada

Respondida
How to run multiple programs
Just put in an .m file (script): test1; %you don't even need the .m here test2; test3; And your three programs will r...

más de 11 años hace | 3

| aceptada

Respondida
Exporting to .mat file in C# (result is corrupt)
Please, save yourself a headache and use the Matlab C++/Fortran API. You would need to be comfortable mixing that with C#, of co...

más de 11 años hace | 0

Respondida
Plotting sector(minor) with a heat map, see image.
It looks like you might want to use the _slice_ plot. I doubt you'll get such a nice image without a lot of work though. ...

más de 11 años hace | 0

Respondida
fastest way to obtain the copt table
<http://www.mathworks.com/matlabcentral/fileexchange/37823-capacity-outage-probability-table--fast->

más de 11 años hace | 0

Respondida
Parfor and cell array
It works for me: p = cell(1,3); w = zeros(5,3); p{1} = rand(2); p{2} = rand(2); p{3} = rand(2); myFun = @(x,...

más de 11 años hace | 0

| aceptada

Respondida
Convert ordered date to formal matlab date
Note that you'd still need the year. But if you know that then: your_date = datenum(your_year-1, 12, 31, 0, 0, 0) + ordinal_...

más de 11 años hace | 0

| aceptada

Respondida
Cell array in parfor: variable cannot be classified
Your cannot index like that. <http://www.mathworks.com/help/distcomp/sliced-variables.html From the documentation on sliced vari...

más de 11 años hace | 0

Respondida
Loading a .csv into a script
Please read the documentation. The function _csvread()_ does what you want. doc csvread

más de 11 años hace | 0

Respondida
What is the most flexible distribution type in histfit?
doc ksdensity Works if fitting is all you care about.

más de 11 años hace | 0

Respondida
How to find the missing points in time series
<http://www.mathworks.com/matlabcentral/answers/76164-filling-gaps-in-time-series-with-nan Something like this?>

más de 11 años hace | 0

Respondida
Conversion between R G B and H S V
I don't get it. _rgb2hsv()_ is a built-in Matlab function. If you want to see how it is implemented, type edit rgb2hsv ...

más de 11 años hace | 0

Respondida
Unzipping a gzipped string
You could always call a PHP script from Matlab using the _system()_ call and have it return the uncompressed string.

más de 11 años hace | 0

| aceptada

Respondida
how do I count number of folder?
all_files = dir; all_dir = all_files([all_files(:).isdir]); num_dir = numel(all_dir);

más de 11 años hace | 0

| aceptada

Respondida
How to graph a f(x,y) function?
x_int = [0 1]; y_int = [0 1]; [X Y] = ndgrid(linspace(x_int(1),x_int(2),150),... linspace(y_int(1),y_int(2),...

más de 11 años hace | 0

Respondida
i want to generalize and reduce following program into one loop
And this is a prime example of why you should store your variables in a single matrix instead of with "numbered" names. So th...

más de 11 años hace | 0

| aceptada

Respondida
How to exclude min and max only once in a if statement?
Can be done with logical indexing: *Edited to take into account the six elements limit* a = randi(10,[5,1]); n = size...

más de 11 años hace | 0

Respondida
State-space to zero-pole conversion.
I can't help you with the particulars of the application because I know nothing about this topic. However, what I can say is: _s...

más de 11 años hace | 0

Respondida
What's a Windows text editor that supports Matlab syntax highlighting?
<http://superuser.com/questions/367889/matlab-syntax-highlighting-in-notepad Notepad++>

más de 11 años hace | 1

| aceptada

Respondida
is x' * x faster than x.^2 (x is a vector)
Why don't you test it? x = rand(10^6,1); tic res1 = x.*x; %The transpose is unnecessary; toc res2 = x.^2; ...

más de 11 años hace | 4

Respondida
show all possible combination
C = nchoosek(1:28,4); To save please read the documentation on _save_ doc save %-ascii option Alternatively doc d...

más de 11 años hace | 0

| aceptada

Respondida
Add existing figures onto of a new plot without using subplot
figure(1) donor = axes; plot(rand(10)); figure(2) aH(1) = axes; plot(aH(1),1:10); aH(2) = axes('Posi...

más de 11 años hace | 0

| aceptada

Respondida
how can i create a slice exactly like slice in the attached file
There is a function that does more or less what you want and is called, shockingly, _slice()_. If you're not interested by cr...

más de 11 años hace | 1

| aceptada

Respondida
finding and storing non zero elements in a NxN matrix
doc sparse

más de 11 años hace | 0

Cargar más