Answered
Using symbolic solver, I seem to not be able to get a system of equations that give me a desired answer. Does a solution not exist?
The real values of Rn, Rp and Rx should be 2e6,1.5e5 and 700k. Those are inconsistent with the equations. Rn = 2e6; Rp = 1.5e...

2 years ago | 1

Answered
OPTIMOPTIONS does not support code generation for function 'ga'.
None of the functions in the Global Optimization Toolbox are supported for code generation. Your only hope would be turning off...

2 years ago | 1

Answered
I have some code that keeps failing to open and read two csv files out of four. Can someone explain what is wrong with either the code or the csv files
Replace h(k) = plot(test(k).disp,test(k).force/1000); set(h(k),'LineWidth',2); with h{k} = plot(test(k).disp,tes...

2 years ago | 0

| accepted

Answered
I'm trying to obtain a the transfer function of a circuit but keep getting "Unable to find explicit solution"
Under the assumption that all of the R values are greater than 0, and all of the C values are greater than 0, and s is greater t...

2 years ago | 1

| accepted

Answered
nested parallel optimization and parfor loops
If you specify the UseParallel option as true, then https://www.mathworks.com/help/gads/particle-swarm-options.html#bued1yt-1 ca...

2 years ago | 0

Answered
Error implementing Newton's Method
syms x f = @(x) x^3 - 2*x^2 - 5; df = diff(f,x) class(df) Notice that the class of df is sym. df is a symbolic scalar. Attem...

2 years ago | 0

Answered
If I deactivate my llicense on one computer to try Matlab on my new computer, can I reactivate the old computer Matlab if the new computer Matlab does not work?
Yes, you can deactivate on the new machine and re-activate on the original machine. However, each cycle will "use up" one transf...

2 years ago | 1

Answered
How to properly read a csv saved cell array.
csv files do not have the capacity to mark cell boundaries. You will never be able to do what you want with a csv file. xls a...

2 years ago | 1

| accepted

Answered
Inertia axes in an image
% Load your binary image image = imread('Cattura.JPG'); % Replace with your image file if size(image, 3) == 3 image = ...

2 years ago | 0

Answered
Working With Reciprocal of Polynomials
It is difficult to tell what you want? syms x f = 10/((x+3).^2.*(x+5)) [N, D] = numden(f) C = coeffs(D, x) poly2sym(C, x) ...

2 years ago | 0

| accepted

Answered
How to Use Future System States to Make Real-Time Decisions in Simulink?
Suppose you are examining time ti . Then to integrate the ode over time ti to ti+2 takes time. But you need the integral to not ...

2 years ago | 0

| accepted

Answered
How can I plot a hyperbola?
hyperbola() function hyperbola() syms x y ; f = 0.4829 - (sqrt((95-x).^2-(0-y).^2)-sqrt((0-x).^2-(0-y).^2)); s...

2 years ago | 0

Answered
Syntax error , Component: Simulink, Category: Block error
Are you trying to use an Interpreted MATLAB Function block ? I think the formula is too complex for an Interpreted MATLAB block,...

2 years ago | 0

Answered
matlab r2014a에서 'gwr'은(는) 유형 'struct'의 입력 인수에 대해 정의되지 않은 함수입니다.
gwr appears to be https://www.mathworks.com/matlabcentral/fileexchange/81011-geographically-weighted-regression You need to ha...

2 years ago | 0

Answered
Ramp a variable with 63 elements
First option: Use a Simulink ramp block with a vector of slopes, and with the setting of "Interpret vector parameters as 1-D" s...

2 years ago | 0

Answered
When did the syntax for linprog change
R2018b documents X = linprog(f,A,b,Aeq,beq,LB,UB,X0) sets the starting point to X0. This option is only available with...

2 years ago | 0

Answered
How to Remove Extra Subplot When Custom Plotting with 'particleswarm'?
'PlotFcn', {'pswplotbestf',plotFcnWithHandle}) Plotting is generating one subplot for each plot function specified in the 'Plot...

2 years ago | 0

Answered
To convert RT structure set from DICOM format to uncompressed NIfTI (.nii) format
Use dicomread to read te RT data. Use niftiwrite to write the .nii . The default value for the 'Compressed' parameter is false...

2 years ago | 0

Answered
.NET method with "out" keyword as an input
C# apparently makes it illegal to read from an "out" parameter before writing to it; https://stackoverflow.com/questions/7716641...

2 years ago | 0

| accepted

Answered
This is showing eror. Unrecognized function or variable 'chaincode'. Error in PELATIHAN (line 48) cc(k)= chaincode(G(k)); Please tell me where I am making mistake.
chaincode() appears to be the following File Exchange contribution: https://www.mathworks.com/matlabcentral/fileexchange/29518-f...

2 years ago | 0

Answered
How can I efficiently save and access large arrays generated in nested loops?
all_data{J1,J2} = struct("A1", A1,... You are creating a separate struct for each {J1,J2}, complete with all of the struct over...

2 years ago | 0

Answered
Dynamic script which creates and deletes parts over time
Create the configuration with all of the blocks. Pass an additional parameter in, which indicates which blocks are active. Lo...

2 years ago | 0

| accepted

Answered
Different behaviour when using symbolic simplification on norm() for scalars and vectors?
Error using symengine Unable to generate code for piecewise for use in anonymous functions. The work-around for that is to use...

2 years ago | 1

Answered
FMU Export with .csv as input
You have the fundamental problem that when you deploy to the FMU, the FMU does not have a filesystem to be able to potentially r...

2 years ago | 0

Answered
Difference between local time and "created_at
"2024-08-21T16:54:31Z" The Z at the end of the timestamp specifically means "Zulu" time, which is UTC. It would be expected ...

2 years ago | 0

Answered
symbolic variable and assignment operator
B=zeros(1,2,'sym'); B will be a symbolic vector of size 1 x 2 U(1)=0.05*(1-tanh(B*(20*(x-0.5)))); On the right hand side, all...

2 years ago | 0

| accepted

Answered
Is there a command to copy output of fprintf (sent to the matlab terminal) to windows clipboard?
If it is not convenient to change the fprintf() to sprintf(), then there are two ways to proceed: enclose the relevant function...

2 years ago | 0

Answered
Compile the C++ code in MATLAB to create a MEX file
addpath('MadgwickAHRS'); % Make sure the Madgwick filter is in the MATLAB path means that there is a subdirectory of the curren...

2 years ago | 0

Answered
colormap using command line in implay()
fig = findall(0,'name', 'Movie Player'); ax = fig.CurrentAxes; caxis(ax, [0 2000]);

2 years ago | 0

| accepted

Answered
subdivide numbers inside a file .xlsx
Your data is stored in single cells of the xlsx. For example -3.55882719e-02, -1.09321419e-02, 8.20557680e-03, 0.00000000e+00, ...

2 years ago | 0

Load more