답변 있음
passing handle objects by value
You don't need to. classdef aclass < handle properties a end end l={} a = aclass(); a.a = 10; l{e...

거의 5년 전 | 0

답변 있음
Why this simple for loop doesn't work?
Use a debugger to check why.

거의 5년 전 | 0

답변 있음
Unkown error my code is running 5 out of 10times randomly. i'm not changing anything but still runs sometime and throws error sometimes in random order
Why do you use 'elseif' below? Change it to just 'else'? function angle = Phase(C,i,j) if real(C(i,j)) >= 0 angle...

거의 5년 전 | 0

답변 있음
How can i use C++ DLL in Simulink?
Did you try to use 'addheader' of loadlibrary? The error seems to be related to header files. https://www.mathworks.com/help/ma...

거의 5년 전 | 0

답변 있음
How do you draw such dynamic diagrams that change over time?
Try this: https://www.mathworks.com/matlabcentral/fileexchange/74003-barchartrace

거의 5년 전 | 0

답변 있음
I get this error when i try to load RL agents. Please Help!
Inside pfcagent.mat, the variable saved is not called "saved_agent". It must be called something else. That is why the first li...

거의 5년 전 | 0

| 수락됨

답변 있음
Problems with redirected stdin and stdout when using py to run python code
Did you try: system('python -c "import ztest; ztest.ztest()"')

거의 5년 전 | 0

답변 있음
Calling Python function with multiple outputs in Simulink
Which version of matlab and python are you using? I tested 2021a, and calling py.testQ.test(x, y) returns a Python tuple. ret ...

거의 5년 전 | 0

답변 있음
Convert Python code to matlab
One possible approach is to call python from matlab. Please refer this this. https://www.mathworks.com/matlabcentral/answers/58...

거의 5년 전 | 0

답변 있음
Adding elements to array without repeating
This will work: result = [F.a F.b F.c]; result = unique(result);

거의 5년 전 | 0

| 수락됨

답변 있음
How can I find a character in a string?
ismember is the function you are looking for.

거의 5년 전 | 1

| 수락됨

답변 있음
Estimation of a unknown matrix from the other known matrices
B=A/C;

거의 5년 전 | 0

답변 있음
[MATLAB Compiler] I want to run a Python package created on Linux on Windows. I get an error when specifying the path to the folder.
Did you try: filename = ['C:/test/file.csv']; Or filename = ['C:\\test\\file.csv']; '\t' has special meaning, and it might c...

거의 5년 전 | 0

| 수락됨

답변 있음
indexing a loop to run through multiple files
Try this: %% input csv files file = dir('*.csv'); %read the files into matlab num_files = length(file); %record how many file...

거의 5년 전 | 0

| 수락됨

답변 있음
Adding elements to array without repeating
Use ismember(233, F.a) before adding it to F.a.

거의 5년 전 | 0

답변 있음
How to realize the variable number of input parameters
How about input two arrays of coordinates? x=[1,2,3,4], y=[5,6,7,8] for example? Your function takes input of two arrays. It doe...

거의 5년 전 | 0

| 수락됨

답변 있음
Getting the wrong output value when running the code
It is a simple function here. This kind of error can be easily found using matlab debugger. Set a break point in the loop, and h...

거의 5년 전 | 0

| 수락됨

답변 있음
Random sample and percentage
Try this? column_count = 100; % your columns row_count = 200; % your rows percentage_to_take = 0.2; % you take 20% of total ...

거의 5년 전 | 0

답변 있음
MATLAB Fedora 34 installer gui issues
How about running a VM of debian and install matlab there?

거의 5년 전 | 0

답변 있음
Extract equivalent RGB without transparency from PNG with alpha channel
For each color channel, try re = (1-alpha)*foreground + alpha*background. Since here background is white, so each channel, b...

거의 5년 전 | 0

| 수락됨

답변 있음
How do I access previous answers to my question?
From this page, select 'My MATLAB Answers" drop down. Then select "My questions".

거의 5년 전 | 0

| 수락됨

답변 있음
Matlab is very slow on macOS Big Sure
Open a terminal window from MacOS and type top This will tell you which process is taking most of the CPU time. Also what is ...

거의 5년 전 | 0

답변 있음
Running python script in C S-function Simulink
Can you change your python code to write to a file? Then your matlab code can read from the file to get the output.

거의 5년 전 | 0

답변 있음
How to create a bus communication with System Composer ?
Yes, it is doable. First create the bus from the source to the first destination. Then hold down the control key of your keyboa...

거의 5년 전 | 1

답변 있음
Delete all rows from a cell array
arr = cell2mat(cellArray); % convert to array first arr(arr>7) = []; % remove cellArray = num2cell(arr); % convert back

거의 5년 전 | 0

답변 있음
Create a matrix of element (points) connectivity
Can you just change m=3; n=3; for 9 ponts?

거의 5년 전 | 0

답변 있음
How can i reshape a matrix to my preferred dimension and discard the excess element
What is the original matrix you want to reshape? Is it signal? If so, how about reshaped = signal(1:fl, :)

거의 5년 전 | 0

답변 있음
how to caculate distance?
Can you figure out the coordinates of those three dots? If so that the distance is defined as d=sqrt((x1-x2)^2+(y1-y2)^2)). Here...

거의 5년 전 | 1

답변 있음
How to find MATLAB function blocks??
Once you find the root of state flow using sfroot, you can use the find function as you used above. In addtion you can add a new...

거의 5년 전 | 0

답변 있음
construct a complex number using real part and abs data
This is really a math question. When you have the real part and the absolute value, the imaginary part is not determined in gene...

거의 5년 전 | 0

더 보기