Answered
checking if field values in a single struct are identical
density_cell = structfun(@(C) {C.density}, YourStruct); EQ = isequal(density_cell{:}); No explicit loop needed (but structfun ...

3 years ago | 1

Answered
How to keep logarithmic scaling constant between multiple graphs?
You need to configure clim (previously called caxis) to be the same for the axes.

3 years ago | 0

| accepted

Answered
How to use comet function to show trajectory of two bodies simultaneously?
comet() is designed to build a timer, display data according to the timer schedule, then destroy the timer and then return. It i...

3 years ago | 0

| accepted

Answered
Create plot (fig file) from text file
https://www.mathworks.com/help/matlab/creating_plots/plots-that-support-tables.html T = readtable(datafile,'Format','auto')...

3 years ago | 0

Answered
Using Matlab perform the convolution of the following signals of different duration and energy
https://www.mathworks.com/help/symbolic/sym.rectangularpulse.html the function accepts 1 argument or 3 arguments but not two a...

3 years ago | 0

Answered
Use already compiled .exe in a new .exe compile (almost like a docker image)
MATLAB Compiler SDK product

3 years ago | 0

Answered
using linspace in a matrix incrementing by a certain number
that would be a row of 5 values inside a matrix that has 4 columns not 5. That is not possible

3 years ago | 0

Answered
numerical integration and solving for limit
your f has x^4 and x^2 but no other powers of x. Do a change of variables X2=x^2 and integrate with respect to X2. You will g...

3 years ago | 0

Answered
Help for implementing timer function
http://psychtoolbox.org/ is the recommended tool for that kind of work. It allows control over timing and detection of key press...

3 years ago | 0

Answered
delete the new line character at the end when using dlmwrite
You cannot. Give up on using dlmwrite in a loop for that purpose. If you are looping over all columns and not writing additio...

3 years ago | 0

Answered
Hi sorry im new to image processing. Need some explanation , which 2 video attachment should I use for this MATLAB code and which reference image i should use? thank you
traffic.avi is supplied with the Image Processing Toolbox. The code reads and displays the content of the avi. The last frame...

3 years ago | 0

Answered
For loop in string array
['Stimulus' num2str(ii) 'Data'] that does not generate spaces between the word and the number. I suggest that you use spr...

3 years ago | 0

| accepted

Answered
Convert an array of numbers into a color mapped image
Array1 =[0 0 0 0 0 0; 0 1 0 2 0 6; 4 0 5 5 0 9; 0 10 7 0 8 0]; Array2 =[0 0 0 0 0 0; 0 1 0 2 0 3; 4 0 5 5 0 6; 0 7 0 8 9 0]; m...

3 years ago | 0

| accepted

Answered
How do I take my generated string outputs from for loop and return a list?
You should be careful what you ask for. 'ACA' is the 1 x 3 char vector ['A' 'C' 'A'] and ['ACA' 'UUU'] is concatenating two 1 x ...

3 years ago | 1

| accepted

Answered
Simulink Coder for MATLAB Home
You can ask for a refund; refunds for Home licenses are accepted up to (if I recall correctly) 7 days.

3 years ago | 0

Answered
How do you turn empty brackets ("[]") in a table into a NaN?
load Data_EMA; mask = cellfun(@isempty,Data_EMA.Data_EMA14); Data_EMA.Data_EMA14(1:10) Data_EMA.Data_EMA14(mask) = {NaN}...

3 years ago | 0

| accepted

Answered
Next value in alphabet
rot1('When is the time? The time for all good people, who come to the aid of their country!') function next = rot1(letter) ...

3 years ago | 0

Answered
find unknow value to plot(best fit)
Your x and r are vectors, so your potential is going to create a vector of equations. You are then trying to solve() that vector...

3 years ago | 0

Answered
Why is my cod not working?
elseif Alpha>1.4 && Alpha<1.6 landa=Alpha_vector(13)-((Alpha-1.4)*(Alpha_vector(13)-Alpha_vector(14))/0.1); The division s...

3 years ago | 0

Answered
plotting using fsolve in a for loop (2 variables)
I had to guess the value of P_ Your equations appear to have complex-valued solutions P_ = 1; k=25; a=-0.0075; b=0.1750; c...

3 years ago | 0

| accepted

Answered
How to change comma to dott for multiple text files and save the changes in the same text files?
The below code will write the changed files into a directory, creating it if needed. projectdir = '.'; outputdir = 'modified';...

3 years ago | 1

| accepted

Answered
could you help fix my code?
Change a=uigetfile(); filename=a; to [a, filepath] = uigetfile(); if ~ischar(a); return; end %user cancel filename = ful...

3 years ago | 0

Question


convert ode function to symbolic form?
Suppose I have a function handle (possibly anonymous) suitable for use as the ode function for ode45 or ode15s or similar functi...

3 years ago | 0 answers | 0

0

answers

Answered
how to Distribute power in a sym array?
expand() It is common to also use collect() after expand() especially if there is more than one symbolic variable

3 years ago | 0

Answered
parfor nested loop ind2sub
You cannot do that. parfor requires that the indexing of output objects must involve a simple linear transformation of the loop ...

3 years ago | 1

| accepted

Answered
why are my programs treated as function?
That problem could occur if you have a V.m that invokes your function. You did not initialize V before trying to append to it, s...

3 years ago | 0

Answered
MATLAB R2022b is not giving the exact answer of this definite integral. What modification is required?
1./cos(36*x) cannot be integrated over that range

3 years ago | 0

Answered
I give 25 point for frequency but I see only one value for conductivity.
The / operator performs least squares fitting. It it only does division in the limiting case that the denominator is a scalar. ...

3 years ago | 0

Answered
Load EEG data in MATLAB
cell2mat(reshape(YourCell, 1, 1,[])) Or... cat(3, YourCell{:})

3 years ago | 1

| accepted

Answered
Get output values from addlistener
For most graphic objects and behaviors, you have code that configures a callback, and then the configuration code keeps running ...

3 years ago | 0

Load more