Réponse apportée
how to find zero value with find
Matlab will index down the columns first. It appears that you want to go across the rows first. So, just transpose the matrix....

plus de 4 ans il y a | 1

Réponse apportée
Illegal use of 'end' in Simulink Coder when copying code from MATLAB to simulink function block
It looks to me like the problem in that screenshot is a typo: "Heaating" vs. "Heating" in the variable name which you are trying...

plus de 4 ans il y a | 0

Réponse apportée
real simulation time in Matlab function code
Add an input to the Matlab function block and connect it to the output of a Clock block.

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How can I represent this state space in MATLAB Code?
You need to replace 7sin(0.05) with 7*sin(0.05). Also, Matlab variable names can't have a space in them so close loop is not a ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Why do I receive "Machine_Problem_8" requires more input arguments to run?
How did you call your function? You can't just press the "Run" button in the editor to call a function that expects input argum...

plus de 4 ans il y a | 0

Réponse apportée
how to combine two matrices?
Maybe this is what you want for #1: Pg = 1; % example value for Pg A=[Pg; 0.5;0.6;0;0;0] B=[0;0;0;0.7;0.7;0.7] C = A+B For ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to explain the code below in the loop so I reduce the lines
This would be a lot easier if all of the csv files were in the same folder. You could then use the dir cmd to get a list of the...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Angular positons are wrong how to correct them ?
I believe that the angles are the angular displacements of the individual joints. If you wish to plot the total angular displac...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Simple Encryption Code check
You are only saving one element of x. You need to index x like you did i. So: function [coded] = caesar(vector, shift) i = d...

plus de 4 ans il y a | 1

Réponse apportée
How to find computational time?
You might be looking for cputime()

plus de 4 ans il y a | 0

Réponse apportée
Seal a cylinder in a scattered plot
Try this (I'm skipping the scatter portion for this example and assuming that you want the 'caps' that seal the ends to have the...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Matlab 2019b handle through script
Depending on your OS, read one of these two solutions: https://www.mathworks.com/matlabcentral/answers/97204-how-can-i-pass-inp...

plus de 4 ans il y a | 0

Réponse apportée
Obtaining vertical and horizontal values from polarplot
The polarplot function won't give you the x and y data. So, you need to calculate it yourself. I've made up r and theta values...

plus de 4 ans il y a | 0

Réponse apportée
Removing specific value from cell array
There may be a more compact (i.e., single line) way to do this but this works and is not too complex: A={[1 2 4 6 7]; [1 2 5 7 ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Plot functions in MATLAB
Since I don't have the Statistics and Machine Learning Toolbox (for the unifrnd() function), I used the base Matlab function ran...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Creating a sound with certain obtained frequencies
Try this. Since you didn't provide f0 in your example code, I just picked some frequencies. Also, I changed to a fixed output ...

presque 5 ans il y a | 0

Réponse apportée
How to separate plot titles on single line? [solved]
Try this: title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);

environ 5 ans il y a | 0

Réponse apportée
How to know what toolboxes and or functions my code in appdesigner is using?
Try this: matlab.codetools.requiredFilesAndProducts('top_level_function.m'); I know this works with regular functions. Not so...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
How to make rotate the circular pattern of balls in a while loop?
I think you are very close to what you want. All I had to do to make this animate is to comment out the `hold on` line and incr...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
"s" in Numerator in First-Order Filter
Use a transfer function block

environ 5 ans il y a | 0

Réponse apportée
What's wrong whith my schedule ?
There are several things wrong with this code. First while E~=0,2 is not valid Matlab syntax. Replace the , with a . if you...

environ 5 ans il y a | 0

Réponse apportée
Turning a 2x80 to an 80x80
It really depend on how you want to expand the matrix. If I understand what you want, you could try something like this: initi...

environ 5 ans il y a | 0

Réponse apportée
Proper usage of GoTo to avoid infinite loop
It appears that you are attempting to create a recursive algorithm. If so, replace "%JUMP TO RUN DIESEL GENERATOR!!!" with anot...

plus de 5 ans il y a | 0

Réponse apportée
How to add animatedline to formatted figure?
From what you have posted, you have explicitly requested a new figure with the line: figure(); This will create a new figure a...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Enter the following variables: a= 123456, b=31/4 , c=cos(π/8). Now calculate
You really should go through the lessons in the Matlab Onramp tutorial if you don't understand how to do these very basic things...

plus de 5 ans il y a | 1

Réponse apportée
Only gu values tu ?
To test for integer values of double numbers (doubles are the default numeric type in Matlab), I would suggest using mod(m,1). ...

plus de 5 ans il y a | 0

Réponse apportée
hello everbody hahzu contain
Your code does what you want if you pass it a character array. For example if you pass '11', you get 3 as a result. Note the si...

plus de 5 ans il y a | 1

Réponse apportée
How to invert a Transfer function in Simulink?
Transfer functions are not allowed to have a higher order in the numerator than in the denominator (more zeros than poles). Thi...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Getting values from balance into matlab
Try this: number = sscanf(a, '%*c %*c %f%*c'); The * characters tell sscanf to ignore (not return) those fields. You can lear...

plus de 5 ans il y a | 0

Réponse apportée
How would I add a label to a variable?
Without extra toolboxes, and assuming that you are programming your 'converter' as a function and you wish to print the results ...

plus de 5 ans il y a | 0

Charger plus