Beantwortet
Why " The boundary condition function BCFUN should return a column vector of length 5" error message is came?
You provide an extra parameter: solinit = bvpinit(linspace(0,1),[0;3;1;1],2); % ^ here...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Table column of strings to a matrix.
A = ["[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[1 1 1 1 1 1 1 1]"]; AC = char(A); AC(ismember(AC, '[] ')) =...

mehr als 3 Jahre vor | 1

Beantwortet
note able to run this program
function [Y,Xf,Af] = myNeuralNetworkFunction(X,~,~) This means, that the 2nd and 3rd input are ignored. But you cannot call thi...

mehr als 3 Jahre vor | 0

Beantwortet
How can I make a feature in a GUI that my user can drag around?
You find some examples for defining and moving sprites in the FileExchange: https://www.mathworks.com/matlabcentral/fileexchang...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
readlines function returns an empty string array
My first idea concerns the relative path: lines = readlines("myfile.dataset", "EmptyLineRule", "skip") Is the current folder r...

mehr als 3 Jahre vor | 0

Beantwortet
Combine matrixes with like same values
bbox = {[0,241,637,168]; ... [204,181,382,286]; ... [56,314,185,243]; ... [0,59,574,506]; ... ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
asking about the error in my code
The error message tells, that this object does not accept 4 inputs. See also the corresponding documentation. What is the purpo...

mehr als 3 Jahre vor | 0

Beantwortet
Why can't I put unassigned variables in a 2 x 1 matrix?
You cannot use not existing variables on the right side of an assigment in Matlab. I cannot imagine what you want to achieve wit...

mehr als 3 Jahre vor | 0

Beantwortet
replacing all occurrences of a string in a file using regexp
Is it required to use regexp? If not: C = readlines(FileName); m = startsWith(C, "VariableProp('" + VarName + ", 'UD', '', ");...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How can I run the datasample function 500 times and record each output within a cell array?
Result = zeros([size(EMG), 500]); for k = 1:500 Result(:, :, k) = datasample(EMG,size(EMG,1)); end

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I keep getting an error that the rows and columns must be of power 2. Am confused
Most likely this is the failing command: [cratio,bpp] = wcompress('c',X,'wpeppers.wtc','spiht','maxloop',16); If so, please re...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Set elements to hide\visible MATLAB Guide)
The action should be done inside the callback function, which is called, when the element is clicked: function baseHeightRbtn_C...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Group number identification consecutive numbers
With FileExchange: RunLength : index = [1 0 1 1 1 0 0 0 1 1 1 0 1 1 0 0 1 1]; [b, n] = RunLength(index); m = n(b == ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to implement more steps in mathwork coding?
Maybe: fun [ …… 0ut2 …. ]= mainfun [………………….] iteration=0 while iteration < maxiterationno ... ...

mehr als 3 Jahre vor | 0

Beantwortet
How do I query 200 cells containing datasets of unequal lengths using one data having complete data?
The data are not random, but the values of the former iterations. You do not reset the contents of refom to NaN in each iteratio...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Create a function to find the product of three numbers, I am trying to use random numbers but an error keeps coming up
Where did you create this function? This cannot happen in the command window. Open a file using the editor, create the function ...

mehr als 3 Jahre vor | 0

Beantwortet
Error (line 43) Conversion to double from cell is not possible.
Use the debugger to examine the problem. Type this in the command window: dbstop if error and run the code again. When Matlab ...

mehr als 3 Jahre vor | 0

Beantwortet
The size function does not return the right number
You do not even need a loop: m = unique([in_M, code_M],'sorted', 'rows'); [len, notImp] = size(m); m = m(m(j,2) <= 4095, :); ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
ODE45 Multiple Degrees of Freedom Problem
The error message tells you, that Matlab fails in the function F. Unfortunately you post the other code, but not the failing fun...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Prompt the user for a number and check whether it is prime or not. Collect these prime numbers and write it to an output text file.
Your code does not collect the prime numbers. Add this in the branch, where a prime number is identified: prime_numbers = [prim...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Are the top-ranked Matlab users working for MathWorks, or do they have another job ?
You can recognize persons working for The MathWorks by the tag "staff" beside their names. Most of the top-ranked members do no...

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
extract data from a specific line of a txt file
Using modern functions to parse the file: Lines = readlines('path/to/file.txt'); Lines = strtrim(Lines); % Maybe some lead...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Error using sum, interpn and ndgrid: Arrays have incompatible sizes for this operation
It is a bad idea to redefine "pi" as variable, because this conflicts with the constant pi. Use the debugger to examine the pro...

mehr als 3 Jahre vor | 0

Beantwortet
"renamevars" doesn't return output
If you want to change this behavior, login with admin privileges and modify the file renamevars.m. You find the check of nargout...

mehr als 3 Jahre vor | 1

Beantwortet
Find out the intersection of two curves despite NaN-Values
x = 0:50; m = 0.234; yaxis = 60; y = (m*x)+yaxis; V1 = [1 2 3 4 5]; V2 = [50 80 NaN 90 100]; V1(isnan(V2)) = nan; % ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Monthly sum function with nansum not being used correctly
function Y = monthly_sum(T, X) grp = [datenum(2000, 1:252, 1), Inf]; ngrp = numel(grp) - 1; c = size(X, 2); X_hour = nan(n...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Saving a grayscale image with scaled values
folder = "directory" for i = 1:100 % Scale the image: img = fisp1(:,:,1,i); tmp = min(img(:)); img = (img -...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
create subfolders that are the same as those in another folder
oldPath = 'C:\Users\Alberto\Desktop\GLOBAL'; newPath = 'C:\Users\Alberto\Desktop\GLOBAL2'; d = dir(oldPath); dfolder...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to change the position of the axis data?
% Dummy contents: H = axes; plot(1:10); drawnow; % Get original ticks: XTick = H.XTick; XLabel = H.XTickLabel; nTick ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Extracting first element of multiple arrays within a cell
result = cellfun(@(c) c(1), zz)

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden