답변 있음
here, i couldn't get the A,B,C values while using if, elseif conditions. how to get values while using conditional statement?
This cannot work: if i==2:m 2:m is a vector. You can compare i with the vector, but the == operator works elementwise. The...

대략 3년 전 | 0

| 수락됨

답변 있음
Error with fopen: I saw a lot of answers saying it has to do with folder permissions, but I should have write permissions because it is a folder I created.
fopen fails to open a file for writing, if: you do not have write-permissing in this folder. You "should" have such permissions...

대략 3년 전 | 0

답변 있음
question regarding sum(m,3) command
Actually a sum over a 3D array along the 3rd dimension replies a [M x N x 1] array, as summing over the 2nd dimension creates a ...

대략 3년 전 | 1

답변 있음
I want to delete part of a row in an array but it kept returning an error
The error message tells you, that the wanted procedure is not possible in Matlab. Matrices and arrays of more dimensions must ha...

대략 3년 전 | 0

답변 있음
Code issue with custom imhist() function
You observe the effect of a saturated integer class: x = uint8(0); x = x + 254 x = x + 1 x = x + 1 % !!! An UINT8 cannot c...

대략 3년 전 | 0

| 수락됨

답변 있음
How do I remove "nested/deeper" layers of a cell?
You have posted a file, which contains the cell matrix called "new_mat". It does not have any second level. Therefore you cannot...

대략 3년 전 | 0

답변 있음
Average across structures and fields
It was a bad idea to hide an index in the field names as in walking_01. Using an array with a real index is smarter. This is fix...

대략 3년 전 | 0

답변 있음
How to read/plot ".ive" file in matlab?
I assume you mean the OpenSceneGraph files. Use this tool to import the data and export them to another file format, which can b...

대략 3년 전 | 0

답변 있음
i just want to check it why its not working can you try it because in my friend laptop it was working pls help
s = fileread('MATLAB.txt'); words = strsplit(s); Do you see it? The code can be simplified massively. n1=0; % Just a hint: w...

대략 3년 전 | 1

| 수락됨

답변 있음
How to ignore leading spaces '_' for numbers when importing a matrix from .txt
What about: M = readmatrix('data.txt', 'LeadingDelimitersRule', 'ignore');

대략 3년 전 | 1

답변 있음
How to input multiple values to the same variable to avoid having to keep changing the values and rerunning the program each time?
Do you get a message concering the && operators? They need scalars are inputs. If you provide vectors, use & . But then if si...

대략 3년 전 | 0

답변 있음
Out of memory when using ode45(@t,x)
I've copied your code without any changes (but adding en end at the bottom) and it is working: %% Initilization th_int=[-pi/2 ...

대략 3년 전 | 0

답변 있음
GUİ edit box setting
syms x eq = sin(x) == pi/2; sol = solve(eq); s = string(sol); set(HandleOfTheEditField, 'String', s)

대략 3년 전 | 0

| 수락됨

답변 있음
how can i print 3 different vectors' while every vector contain different variable type?
Vectors, matrices and other arrays (except for cell array) contain elements of the same class. This is the definition of an arra...

대략 3년 전 | 0

답변 있음
Minkowski sum of two sets
See https://en.wikipedia.org/wiki/Minkowski_addition Guessing the type of the input: A = rand(5, 2); % "Points" as x and y c...

대략 3년 전 | 0

| 수락됨

답변 있음
What can we do with the thread "license-manager-error-9"?
That thread contains serveral useful advices. If they do not help already, contacting the support directly is the best choice. ...

대략 3년 전 | 0

답변 있음
Out of Memory error when resizing 3D volumes
If the resized image is stored as uint8, you need 2080 * 2080 * 2145 = 9.28 GB of free RAM. For images in double format you need...

대략 3년 전 | 0

답변 있음
Translate code to parallel computing
% In this lottery, 15 numbers out of 25 (1 to 25) are drawn. You can win % specific prizes if you match 11 numbers, or 12 numbe...

대략 3년 전 | 1

| 수락됨

답변 있음
Please help me to give answer my 2 questions
Connecting the Matlab drive is explained here: https://www.mathworks.com/help/matlab/matlab_env/install-matlab-drive.html If ...

대략 3년 전 | 1

| 수락됨

답변 있음
How to implement this coupled ODE
[t,m] = ode45(@(t,m) myode(t,m), tspan, m0); Here myode has 2 inputs only. function dydt = myode(t,y,a_in) Here it has 2 inp...

대략 3년 전 | 0

답변 있음
Loop cycle to input similar txt files
Data_{m}_{i} is your invention an no valid Matlab syntax. This is not the way programming works. Matlab does not magically modi...

대략 3년 전 | 0

| 수락됨

답변 있음
randomly sample a pair of values in a double
You want a random integer in the range [1, 65] as index? randi([1, 65]) I have no idea, what "distance and then the value/180*p...

대략 3년 전 | 0

답변 있음
Rename variable throughout project/directory
You can modify the field names using regexprep : % Get a list of M-files: List = dir(fullfile(Folder, '**', '.m')); for k = 1...

대략 3년 전 | 0

답변 있음
explaining this code for me please it's about making circuit in matlab but i confused here because i want to write comments in every line i have 160 line but i put some
while ~isreal(R) || any(R<=0) || mod(n,2)==0 || any(n<1) Comment: Repeat until R is a real positive value and n is an odd posit...

대략 3년 전 | 0

답변 있음
How to access specific data in a cell array
No. Cell arrays need to be accessed in a loop for this case. You can hide the loop using cellfun, but this runs a loop internall...

대략 3년 전 | 1

| 수락됨

답변 있음
MEX error LNK2019:unresolved symbol
I suggest to follow the official installation instructions: https://nlopt.readthedocs.io/en/latest/NLopt_Installation/ and for W...

대략 3년 전 | 0

답변 있음
Increase figure size on the screen but save with specific dimension in centimeters
Figures have the properties 'Position', which defines the size on the screen, and 'PaperPosition' and 'PaperSize', which determi...

대략 3년 전 | 0

답변 있음
I am getting an error "Index in position 1 exceeds array bounds. Index must not exceed 1." Error in "v_x(n) = fmincon(fun_x(n), x0, A_x(n,:), b_x(n,:)); Can someone help"
Change: fun_x{n} = @(v_x)((norm(v_x(n) - v_des_x(n)))^2); fun_y{n} = @(v_y)((norm(v_y(n) - v_des_y(n)))^2); v_x(n...

대략 3년 전 | 0

| 수락됨

답변 있음
How can i use intersect function correctly ?
There are no overlapping points: f = @(x) 1 + cos(x); g = @(x) sin(x); x = 1.54:.01:1.6; plot(x, f(x), 'r.', x, g(x), 'b.');...

대략 3년 전 | 2

답변 있음
generating matrices from another matrix
x = [1,0,0,1,0,1]; d = diag(x); Share1 = d; Share1(1, 2) = 1; Share2 = d; Share2(1, 3) = 1; Share3 ...

대략 3년 전 | 0

더 보기