回答済み
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

| 採用済み

回答済み
[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

さらに読み込む