Answered
Error using plot Vectors must be the same length.
fs=500; t=(0:(6*fs-1))/fs; sygnal2a=sin(t(1:500)*1*2*pi); sygnal2b=sin(t(1:500)*1*2*pi+2*pi); sygnal2b is the same as sygn...

1 month ago | 0

| accepted

Answered
MATLAB freeze after closing figures
This is a known problem with R2023b and Apple Silicon https://www.mathworks.com/matlabcentral/answers/710913-matlab-r2020b-free...

1 month ago | 0

Answered
How to optimise an objective function with a summation of integrals
x = lsqnonlin(@(x)(S(P,T,N,Limites_Sectores_T,x)), x0, lb, ub,[],[],Aeq, beq, options); There are a few different valid calling...

1 month ago | 0

Answered
Matrixwise subtraction yields vector - how to reshape to original logical matrix?
One way: result = arrayfun(@(IDX) mean(A(cmpMatrix(:,IDX),IDX)-B(cmpMatrix(:,IDX),IDX)), 1:size(A,2)) Chances are that this wi...

1 month ago | 1

Answered
How to import text data with different column lengths without having NaN
There is no option for producing column vectors of different lengths. After you readtable, you can newTable = varfunc(@(DATA...

1 month ago | 0

Answered
Wrong print negative number with fprintf in hex
rng(73); N = 20; r = (randn(N, 1) + 1j.*randn(N, 1)) * 10000; for i = 1:N fprintf('Real[%d] = %04X; ', i, typecast(int16...

1 month ago | 2

| accepted

Answered
Solving large number of equations
syms X1 X2 X3 X4 X5 X6 X7 X8 p_11 = 1; p_12 = 2; p_13 = 3; p_14 = 4; p_15 = 5; p_16 = 6; p_17 = 7; p_21 = 8; p_22 = 9; p_23 ...

1 month ago | 0

| accepted

Answered
How to Rewrite This Section of Code as a For Loop
termAsum = 0; for term = termA(:).' termAsum = termAsum + term; end

1 month ago | 0

Answered
Running code for different variable values.
theta = 0:2:12; num_theta = length(theta); alpha = zeros(num_theta, 147); for i = 1 : num_theta this_theta = theta(i); ...

1 month ago | 0

| accepted

Answered
imread file does not exist - Unable to read file with multiple images
% Specify the filename containing images foldername = 'D:\BMPtoPNG'; % Read all images from the file dinfo = dir(foldername...

1 month ago | 0

Answered
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values.
You would get this error if the grading system is expecting n to be a scalar but n is a 2D array instead.

1 month ago | 0

| accepted

Answered
Variable q4 has an incorrect value.
syms x y g(x,y) = x*y/(x^2+y^2) dyxx = diff(diff(diff(g(x,y),y),x),x) q4 = subs(dyxx,{x,y},{1.2,3.8})

1 month ago | 0

| accepted

Answered
How do I complete my matlab code for a given formula.?
The first thing you have to do is figure out which of the two clusters corresponds to which condition. kmeans() clustering with...

1 month ago | 0

| accepted

Answered
Variable q5 must be of size [1 2]. It is currently of size [1 1]. Check where the variable is assigned a value.
syms x y f(x,y)=x-x*y^2+sqrt(y); u = sym([2,9]); part1 = u/norm(u) part2 = jacobian(f(x,y),[x,y]) q5 = dot(part1, part2) Y...

1 month ago | 0

Answered
MATLAB does not run on new iMAC
You need to deactivate on your old Mac and reactivate on your new Mac.

1 month ago | 0

Answered
Which function used to use in M-Script to remove the variables
It is not possible to create a variable with a name similar to 1Tn007 What can happen is that if you load() a .mat that was ge...

1 month ago | 0

Answered
Need Help Simplifying code
Replace pick=find(max(playerInfo(2,:))==playerInfo(2,:)); pick=pick(1); with [~, pick] =...

1 month ago | 0

| accepted

Answered
Legend according to colours of the bars
questionnaire = {'A', 'B', 'C', 'D', 'E', 'F'}; for i = 1:numel(arrays) subplot(4, 1, i); values = arrays{i}(:, 2);...

1 month ago | 1

| accepted

Answered
why i got this error when i want to use GPU to accelerate the simulation?
In MATLAB R2021b, only the following are supported for GPU Coder work: Microsoft Visual C++ 2019 product family Microsoft Vis...

1 month ago | 0

| accepted

Answered
Can I create a stand-alone Windows application from my Mac that permits parallel processing?
There is no support for building for a Windows target on a Mac or Linux. ... You could potentially use Parallels.

1 month ago | 0

| accepted

Answered
Will Quality of Documentation be better in 2024 Products?
No, it will not improve in R2024a.

1 month ago | 2

Answered
I am supposed to assign a license to a colleague but I cannot find the license center.
https://www.mathworks.com/mwaccount/ is the license centre.

1 month ago | 0

Answered
Shift in lines when creating videos using VideoWriter
This is a known problem in R2023b for the Apple Silicon Possibly it only happens when you only write a single frame to the movi...

1 month ago | 0

Answered
"Could not find version 7.17 of the MCR" error while running Matlab2013b with DKE, even after downloading Compiler 7.17 and 8.2
mcr 7.17 corresponds to r2012a https://www.mathworks.com/products/compiler/matlab-runtime.html

1 month ago | 0

Answered
Creating a loop to assign 20 players to two teams and deleting columns
numPlayers = 20; ftPercent = randi([50,90],1,numPlayers); avgNumTurnover = randi([0,8],1,numPlayers); playerInfo = [1:1:numPl...

1 month ago | 0

Answered
Converting table data from Celsius unit to Fahrenheit unit
Result = T(:,10:17) * (9/5) + 32 ;

1 month ago | 0

| accepted

Answered
Im creating a nested treemap, but the output is giving different colors for the legend and treemap
legend() does not permit passing in an N x 3 array of legend colors. legend() does not permit setting Color at all. legend() p...

1 month ago | 0

Answered
I can't minimize fval value using this code
You have constraints = @(capplcsz_opt) constraint_GA(capplcsz_opt, Vmax, Vmin); when you should have constraints = @(capplcsz...

1 month ago | 0

Load more