Respondida
How to select specific data and create a table
One approach: [~, ~, data] = xlsread('Example_Runners.xlsx'); %read the whole lot data = data(2:end, :); %remove header isr...

alrededor de 7 años hace | 1

| aceptada

Respondida
create vector based on string data
I would do it like this: cell_array = { 'FA.EA'; 'FA.EB'; 'FA.EC'; 'FA.EA'; 'FA.EB'; 'FB.EC'; 'FB.EA'; 'FB.EB'; 'FC....

alrededor de 7 años hace | 2

Respondida
Not enough input arguments
>> ecc_anomaly Calls ecc_anomaly with no inputs argument. So, yes, you will get a "Not enough input arguments." error. I'm not...

alrededor de 7 años hace | 1

Respondida
Implicit loop or break for large data set
If I understood correctly: Aidx = discretize(B, [A; Inf]); %find the index of the A element that is immediately smaller than ...

alrededor de 7 años hace | 0

| aceptada

Respondida
Finding n-th fibonacci numbers larger than 100
I would suggest you do some research into fibonacci algorithms as the one you've implemented is the most inefficient one. It wil...

alrededor de 7 años hace | 0

Respondida
How do I move an image into a cell?
If I understood correctly, function newImgs = imresizenew(img, scale) newImgs = arrayfun(@(s) imresize(img, s), scale, 'Un...

alrededor de 7 años hace | 0

| aceptada

Respondida
Index exceeds the number of array elements .
In the code you wrote, for i = 1:6 So, maximum value of i is 6. It is used in your expression: dy(4*(i-1)+1) = xxx*y(4*(i-1)+...

alrededor de 7 años hace | 2

| aceptada

Respondida
could you please convert it into a loop
In addition to what Stephen said, it's very easy to create your L for any n, without even a loop: K = [1 2; 3 4]; n = 5; L ...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to Sum a loop and Then Loop that Sum
a = [4, 8, 9, 11, 13]; d = [0.2, 0.3, 0.5, 0.6, 0.8]; d = d.'; %transpose d so it's a column vector result = a .* d .* (1 ...

alrededor de 7 años hace | 0

| aceptada

Respondida
Help needed to validate if a directory exists and the user has write permissions
It's rarely a good idea to perform this kind of checks. The situation may have changed in between the moment you did the check a...

alrededor de 7 años hace | 1

Respondida
Double inputs must have integer values in the integer range when mixed with integer inputs.
The error is fairly clear. Either column_image or m is of type double while the other is an integer type. And the value at index...

alrededor de 7 años hace | 0

Respondida
How to suppres command windows output
Sounds like you want to toggle output on and off probably for debugging purpose. In that case, you should be using the debugging...

alrededor de 7 años hace | 0

| aceptada

Respondida
Matlab creates conflict file when saving
Conflict files are typically created by version control systems. They're not normally generated automatically but on commit. Per...

alrededor de 7 años hace | 0

| aceptada

Respondida
how can i build a for loop to create histograms for a multiple cell array?
First, don't use 2D indexing for vectors. result{ii} will work whether result is a row or column vector. Your result{1, ii} will...

más de 7 años hace | 0

| aceptada

Respondida
How do I split a string into two strings using a space + number delimiter and/or search for the delimiter by counting right to left?
Not sure what exactly the format of your data is (use valid matlab syntax to construct your examples to avoid ambiguity). Is col...

más de 7 años hace | 0

| aceptada

Respondida
How do I modify this code so it counts how many times the recursive function is called upon?
You could also not bother with the persistent variable and just pass the count as input/output: function [X, count] = sudoku(X,...

más de 7 años hace | 1

Respondida
TCP connection on old Matlab version
You can always delegate to Java or, if on Windows, .Net. Both are not much more complicated to use than matlab's own implementat...

más de 7 años hace | 0

Respondida
How do I call a .NET dll function from MATLAB?
While looking for a setting to configure the bitness in the online documentation, I came across these prerequisites: .NET assem...

más de 7 años hace | 0

| aceptada

Respondida
How to draw a L*a*b* colour space or HSV colour space (2D)?
As commented in your question, note that you're only plotting one slice of the 3D colour space. Of course, your original code d...

más de 7 años hace | 2

| aceptada

Respondida
How do I have MATLAB read an Excel file, interpolate between table values, and then assign the values to variables?
There's certainly no need for excel, if all you're using it for is passing data to matlab. Using text files would be simpler and...

más de 7 años hace | 0

| aceptada

Respondida
How can I default an array to show either 0's or 1's?
If I understood correctly, wantedarray = pict >= 16.5; %everything above 16.5 becomes 1, everything else 0 %or wantedarray =...

más de 7 años hace | 0

| aceptada

Respondida
How to find all the elements of a row whose one or two column values are entered by a user?
userinput = [6 5]; %obtained however you want A(all(A(:, [1 2]) == userinput, 2), :) %returns the row(s) for which both col...

más de 7 años hace | 0

| aceptada

Respondida
List of all opened Excel Workbooks in Matlab R2018b
Unfortunately for you, this behaviour is not controlled by Matlab but by Excel and your OS. In particular, the behaviour may cha...

más de 7 años hace | 1

| aceptada

Respondida
Problems with te output of writetable function
Walter was correct, some of your text fields contain newlines. So, of course, when the newlines are written it messes up the fil...

más de 7 años hace | 0

| aceptada

Respondida
How to convert 3d monthly data into season
I don't see anything wrong with Akira's approach. It does what is asked (except that it has a wrong start of season). However, ...

más de 7 años hace | 1

Respondida
How to reduce execution time in nested for loops and struc. arrays
Your current code is equivalent to: U = struct('SINR_MAX', num2cell(zeros(1, NOU)), 'SINR_F_AVG', 0, 'v', [], 'w', [], 'SINR_IN...

más de 7 años hace | 1

| aceptada

Respondida
can this loop be vectorized
c = a ~= a.' %works since R2016b prior to R2016: c = bsxfun(@ne, a, a.') %ne is the function name of ~=

más de 7 años hace | 0

| aceptada

Respondida
Applying a function across multiple columns
Loops certainly not needed: X = N_red_noise(1:N:end, :); : for the columns tells matlab, do it for all the columns. Note tha...

más de 7 años hace | 0

| aceptada

Respondida
finding coordinates from a plot
Note that your loops are not needed. You could calculate all the values at once, and plot that. Even if you use a loop, repeatin...

más de 7 años hace | 0

Respondida
Group cell array and vector for "for loop and if statement"
I do not really understand your interpolation at all. I do not understand how your interpolated values go from 77.28 when half o...

más de 7 años hace | 0

Cargar más