送信済み


N_PERMUTE_K
All possible permutations of the elements of set N, taken K at a time, with repetition.

14年弱 前 | ダウンロード 2 件 |

4.33333 / 5
Thumbnail

回答済み
To set value based on condition in a matrix
Here is an example. % First make the matrix and get the needed numbers... A = zeros(ceil(rand(1,2)*10)+1); % The matri...

14年弱 前 | 0

回答済み
Is this a Possible MATLAB bug? (Further strange Behavior)
According to the documentation, " _The MATLAB software creates the ans variable automatically when you specify no output argu...

14年弱 前 | 1

回答済み
Using ' findobj ' command and then determining the figure objects from the list of handles
You can narrow your search to specific object types in only specific figure windows. findobj(1,'type','line') % Finds only ...

14年弱 前 | 0

回答済み
how to avoid using num2cell when dealing to structure arrays?
There is a way to do it, and it will be faster (at least it is here): for ii = 1:length(b) a(idx(ii)).a = b(ii); ...

14年弱 前 | 1

| 採用済み

回答済み
Summing within an array to change the size
Here is one way to do it: A = magic(6); cellfun(@(x) sum(x(:)),mat2cell(A,2*ones(1,3),2*ones(1,3)))

14年弱 前 | 0

回答済み
how speed up or avoid loops
This is much faster. Note that you are masking a very valuable MATLAB function by naming a variable 'sum' in your loop! Please...

14年弱 前 | 1

| 採用済み

回答済み
how to throw out certain intervals.
Is this what you want? X = [ 2 3 4 57 36 2 ]; Y = X(X>10) I take it this is what you are after because of a loop you ...

14年弱 前 | 0

回答済み
Using i and j as variables
Yes, I ran into much trouble in my early days of MATLAB using i and j as indices in signal processing and data manipulation code...

14年弱 前 | 5

| 採用済み

回答済み
How can I quickly refer to various object handles in my GUI?
Here is how I handle situations like these. I store all handles to a specific type in a structure with a fieldname correspondin...

14年弱 前 | 0

| 採用済み

回答済み
Double Loop iterations doubt
Is this what you mean? if ~mod(i,12) j = j + 1; end I am assuming here that j is set outside the loop you sho...

14年弱 前 | 1

| 採用済み

回答済み
Search and Compare Arrays
I assume the temperatures in B exactly match those in A? In other words, you are not interpolating. First the FOR loop you req...

14年弱 前 | 1

| 採用済み

回答済み
Problem with markers & dashed lines in figures containing both plot and fill
This is a problem with the opengl renderer. When you have a transparency, you are using opengl, and it can be buggy. To see th...

14年弱 前 | 1

| 採用済み

回答済み
Error: Not enough input argument (line 6)
The error is not in the function, but in the way you called it. You called it with no input arguments.

14年弱 前 | 1

| 採用済み

回答済み
changing an image to rgb format
A png is already 3D. I have an image named IMG.png in my directory. Now look: >> X = imread('IMG.png'); >> whos ...

14年弱 前 | 0

| 採用済み

回答済み
Which solver to use? I cannot get an answer, though I know there is one.
Use: ROOT = solve(lhs-rhs,'L'); There are other roots. You might just want to use FZERO: fzero(@(x) subs(lhs,x...

14年弱 前 | 0

| 採用済み

回答済み
Slider for Multiple Plots in GUIDE
Here is a simple example GUI. Note that the same principle applies in GUIDE. function [] = slider_plot() % Plot dif...

14年弱 前 | 1

| 採用済み

回答済み
Generate a matrix of 1 and 0
Is this what you mean: A =[4 5 3 2 4 2 1 4]; U = unique(A); B = zeros(max(U)); for ii = U B(A==ii,ii) =...

14年弱 前 | 0

| 採用済み

回答済み
GUI GUIDE Error with Map
You clear long and lat, then immediately try to use them. This is your error. You also rely on Poofing variables into your wor...

14年弱 前 | 0

| 採用済み

回答済み
Accessing cell array via factor/index
I assume you mean that the each row in the third column contains one of 'fs','pre','sv',or 'to', not all 4! This snippet finds ...

14年弱 前 | 0

回答済み
how to write a loop
Instead of using: for i=1 use if i==1 (And it is generally not recommended to mask MATLAB functions in your co...

14年弱 前 | 0

回答済み
How can I forecast an integer related to other 5 numbers?
Here is another way that uses no toolbox. Find the weights.... % First the data. D = [33 48 47 68 79 6; 26 32 3...

14年弱 前 | 0

回答済み
Why does dir('*.mat') not list all of the .mat files in directory?
Are you sure about those files being in there? Does WHAT see them (type: what) in there? D = dir; length(regexp([D(:).n...

14年弱 前 | 0

| 採用済み

回答済み
How can I fill a plot section from a single x,y coordinates?
I would fill it with a patch object. line([1 1],[0 100],'color','b','linewidth',3); hold all verts = [[0;1;1;0],[...

14年弱 前 | 0

| 採用済み

問題


Find the repeating decimal pattern!
Write a function that takes one double input value and returns only the repeating decimal, if any, as a string. Only decimals f...

14年弱 前 | 2 | 15 個のソルバー

回答済み
while loop; a small problem
This loop, as you written it, should always 'get stuck' because k does not change inside the loop. What are you trying to do wi...

14年弱 前 | 0

回答済み
How can I get the index of the selected item in a pop-up menu within a uitable?
I don't see how to do this. The best I can suggest to you is to use <http://www.mathworks.com/matlabcentral/fileexchange/14317-...

14年弱 前 | 0

回答済み
Converting rad to deg in a static text box GUI?
The problem is that you are passing ANGLEDIM a string and expecting a string output. It takes and returns doubles, not strings....

14年弱 前 | 0

| 採用済み

回答済み
How do I correct this plot code?
Whenever you mean to multiply (or divide) a vector by a vector on an element-by-element basis, you must use the (.*) or (./) ope...

14年弱 前 | 0

さらに読み込む