Generate C code from Simulink model | Simulink tutorial | MATLAB Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น • 10

  • @peterlodengo4838
    @peterlodengo4838 ปีที่แล้ว

    Great information, thank you very much.

  • @shresthabanerjee494
    @shresthabanerjee494 2 ปีที่แล้ว +1

    Sir I was given the following question
    Write a MATLAB function called looptest (N) that loops through the values I through N and for each number n it should divisible by 2', 'n is divisible by 3, 'n is divisible by 2 AND 3 'n is NOT divisible by 2 or 3
    In answer i have written
    function loopTest(N)
    for i=1:10
    r=rem(i,2);
    s=rem(i,3);
    if r==0 && s==0
    fprintf("%d is divisible by 2 AND 3
    ",i);
    elseif r~=0 && s~=0
    fprintf("%d is not divisible by 2 or 3
    ",i);
    elseif r~=0 && s==0
    fprintf("%d is divisible by 3
    ",i);
    elseif s~=0 && r==0
    fprintf("%d is divisible by 2
    ",i);
    end
    end
    N is given by me in input.is this wrong?

    • @LearningVibes
      @LearningVibes  2 ปีที่แล้ว

      I will check it and let you know

  • @babakkhaleghiborna7027
    @babakkhaleghiborna7027 ปีที่แล้ว

    Thanks a lot 🙏 ❤❤❤❤🎉🎉🎉🎉

  • @rafayali3643
    @rafayali3643 ปีที่แล้ว +2

    Can you convert these simulink model to matlab code not C or C++

  • @PankajKumar-tr2ib
    @PankajKumar-tr2ib ปีที่แล้ว

    when changing nonreusable function to reusable function in code interface ..giving error in python please help

  • @bharath19b
    @bharath19b ปีที่แล้ว

    you cant plainly copy into a controller - how will you do it say for arduino?

    • @peterlodengo4838
      @peterlodengo4838 ปีที่แล้ว +1

      Arduino cannot store the Simulink code, but it executes directly while connected to MATLAB.

  • @mhmdalrassam2635
    @mhmdalrassam2635 ปีที่แล้ว

    Cutral v? Or B